rgeo-geojson 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c294c6715f3cc6e2cf9e767f11c34658da71af9
4
- data.tar.gz: a5d7337044505ceb2f03660017c3b81270a1f884
3
+ metadata.gz: 7dab5c9e99a98186e34cab73140d0ffb78abbd8f
4
+ data.tar.gz: 77bce3065593ff01d7712db8d59bb1ee1995e00b
5
5
  SHA512:
6
- metadata.gz: b722b9d30ec8845de0a273036f4e065224063b91de795a68d8da0184cac21be744f5676e930efc98f305c0401a05208807d4198ef72b3ad6f75dd536ad786481
7
- data.tar.gz: 90fe660e962f8b6d4f3005eac99a7fc6e054dd44842c96430e9dafe5bfb342a07ae0aca3b9a636f8cc8a4c48d5e5215166959200b5572063707883bfdd74d8a1
6
+ metadata.gz: 2644edd9c8b6d9a685c3d08e6d9d580a509e8a87878b45ec03da1beba0c4d404a11bc08b924e2d2aaa242f75f0f2d3a033da75d59f42d3ba56506facd0f67075
7
+ data.tar.gz: fea8441b6e92d79fbe696ddbb9a3a588ed145d8c8549f660ba5b101558a35a877571b6fe23968a2306a3de4e8cb6656ed3110660362832cca35d54d2f8afee1f
@@ -135,22 +135,7 @@ module RGeo
135
135
  json
136
136
  end
137
137
 
138
- def _encode_geometry(object, point_encoder = nil) # :nodoc:
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, point_encoder) },
173
+ "geometries" => object.map { |geom| _encode_geometry(geom) }
189
174
  }
190
175
  else
191
176
  nil
@@ -75,7 +75,7 @@ module RGeo
75
75
  def property(key)
76
76
  @properties[key.to_s]
77
77
  end
78
- alias_method :[], :property
78
+ alias [] property
79
79
 
80
80
  # Gets an array of the known property keys in this feature.
81
81
 
@@ -1,5 +1,5 @@
1
1
  module RGeo
2
2
  module GeoJSON
3
- VERSION = "0.4.2".freeze
3
+ VERSION = "0.4.3".freeze
4
4
  end
5
5
  end
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.2
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-01-05 00:00:00.000000000 Z
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: '10.4'
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: '10.4'
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.5.1
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.