rgeo-geojson 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rgeo/geo_json/coder.rb +2 -17
- data/lib/rgeo/geo_json/entities.rb +1 -1
- data/lib/rgeo/geo_json/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dab5c9e99a98186e34cab73140d0ffb78abbd8f
|
4
|
+
data.tar.gz: 77bce3065593ff01d7712db8d59bb1ee1995e00b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2644edd9c8b6d9a685c3d08e6d9d580a509e8a87878b45ec03da1beba0c4d404a11bc08b924e2d2aaa242f75f0f2d3a033da75d59f42d3ba56506facd0f67075
|
7
|
+
data.tar.gz: fea8441b6e92d79fbe696ddbb9a3a588ed145d8c8549f660ba5b101558a35a877571b6fe23968a2306a3de4e8cb6656ed3110660362832cca35d54d2f8afee1f
|
data/lib/rgeo/geo_json/coder.rb
CHANGED
@@ -135,22 +135,7 @@ module RGeo
|
|
135
135
|
json
|
136
136
|
end
|
137
137
|
|
138
|
-
def _encode_geometry(object
|
139
|
-
unless point_encoder
|
140
|
-
if object.factory.property(:has_z_coordinate)
|
141
|
-
if object.factory.property(:has_m_coordinate)
|
142
|
-
point_encoder = proc { |p| [p.x, p.y, p.z, p.m] }
|
143
|
-
else
|
144
|
-
point_encoder = proc { |p| [p.x, p.y, p.z] }
|
145
|
-
end
|
146
|
-
else
|
147
|
-
if object.factory.property(:has_m_coordinate)
|
148
|
-
point_encoder = proc { |p| [p.x, p.y, p.m] }
|
149
|
-
else
|
150
|
-
point_encoder = proc { |p| [p.x, p.y] }
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
138
|
+
def _encode_geometry(object) # :nodoc:
|
154
139
|
case object
|
155
140
|
when RGeo::Feature::Point
|
156
141
|
{
|
@@ -185,7 +170,7 @@ module RGeo
|
|
185
170
|
when RGeo::Feature::GeometryCollection
|
186
171
|
{
|
187
172
|
"type" => "GeometryCollection",
|
188
|
-
"geometries" => object.map { |geom| _encode_geometry(geom
|
173
|
+
"geometries" => object.map { |geom| _encode_geometry(geom) }
|
189
174
|
}
|
190
175
|
else
|
191
176
|
nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgeo-geojson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rgeo
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '11.0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '11.0'
|
70
70
|
description: Convert RGeo data to and from GeoJSON. rgeo-geojson is an extension to
|
71
71
|
the rgeo gem that converts RGeo data types to and from GeoJSON.
|
72
72
|
email:
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.6.2
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Convert RGeo data to and from GeoJSON.
|