geojson2image 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geojson2image.rb +3 -5
- data/lib/geojson2image/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b8858702642316e6e0a77abed4ecf6433c7564a955e000986e8d27ef42468ed
|
4
|
+
data.tar.gz: d1c6e441d97b3e5d24da7bde8be6f75851ad5c8369e82b7a70a6dd1cc369037d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4150d0ea1b149e3c0597468190cb7dfafe80aecc7e44e4a97761b05d20b540cd75b2e8a11546f2480bb6aeae977d9a8b43189b16c92225e916e546f27fec9796
|
7
|
+
data.tar.gz: 65cd6c097fc97c8655efa87750442a9e41b5d1e1601fb05f49d234069811b0634eacb4ae523698ad7b5407da5a71d8c8b5f6f02a2ac5a7984c1a4fc15e3aef52
|
data/lib/geojson2image.rb
CHANGED
@@ -205,20 +205,18 @@ module Geojson2image
|
|
205
205
|
end
|
206
206
|
end
|
207
207
|
|
208
|
+
border_points = []
|
208
209
|
json['coordinates'].each do |linestrings|
|
209
|
-
border_points = []
|
210
210
|
if linestrings[0] != linestrings[linestrings.count - 1]
|
211
211
|
linestrings << linestrings[0]
|
212
212
|
end
|
213
|
-
|
214
213
|
linestrings.each do |point|
|
215
214
|
new_point = transform_point(point)
|
216
215
|
border_points << "#{new_point[0]},#{new_point[1]}"
|
217
216
|
end
|
218
|
-
|
219
|
-
points = ChunkyPNG::Vector.multiple_from_string(border_points.join(", "))
|
220
|
-
@png.polygon(points, tmp_stroke, tmp_fill)
|
221
217
|
end
|
218
|
+
points = ChunkyPNG::Vector.multiple_from_string(border_points.join(", "))
|
219
|
+
@png.polygon(points, tmp_stroke, tmp_fill)
|
222
220
|
|
223
221
|
when 'MultiPolygon'
|
224
222
|
json['coordinates'].each do |polygon|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geojson2image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryce Johnston
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|