rgeo 1.0.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -105,7 +105,7 @@ module RGeo
105
105
  str_.force_encoding("US-ASCII") if str_.respond_to?(:force_encoding)
106
106
  str_
107
107
  end
108
- alias_method :to_s, :as_text
108
+ alias to_s as_text
109
109
 
110
110
  def as_binary
111
111
  @factory._generate_wkb(self)
@@ -120,7 +120,7 @@ module RGeo
120
120
  end
121
121
 
122
122
  def equals?(rhs_)
123
- return false unless rhs_.is_a?(::RGeo::Feature::Instance)
123
+ return false unless rhs_.is_a?(RGeo::Feature::Instance)
124
124
  fg_ = factory._convert_to_fg_geometry(rhs_)
125
125
  if !fg_
126
126
  false
@@ -132,7 +132,7 @@ module RGeo
132
132
  @fg_geom.eql?(fg_)
133
133
  end
134
134
  end
135
- alias_method :==, :equals?
135
+ alias == equals?
136
136
 
137
137
  def disjoint?(rhs_)
138
138
  fg_ = factory._convert_to_fg_geometry(rhs_)
@@ -208,7 +208,7 @@ module RGeo
208
208
  fg_ = factory._convert_to_fg_geometry(rhs_)
209
209
  fg_ ? @fg_geom.relate_pattern(fg_, pattern_) : nil
210
210
  end
211
- alias_method :relate, :relate? # DEPRECATED
211
+ alias relate relate? # DEPRECATED
212
212
 
213
213
  def distance(rhs_)
214
214
  fg_ = factory._convert_to_fg_geometry(rhs_)
@@ -228,14 +228,14 @@ module RGeo
228
228
  fg_ ? @factory._wrap_fg_geom(@fg_geom.intersection(fg_), nil) : nil
229
229
  end
230
230
 
231
- alias_method :*, :intersection
231
+ alias * intersection
232
232
 
233
233
  def union(rhs_)
234
234
  fg_ = factory._convert_to_fg_geometry(rhs_)
235
235
  fg_ ? @factory._wrap_fg_geom(@fg_geom.union(fg_), nil) : nil
236
236
  end
237
237
 
238
- alias_method :+, :union
238
+ alias + union
239
239
 
240
240
  def unary_union
241
241
  return unless @fg_geom.respond_to?(:unary_union)
@@ -247,7 +247,7 @@ module RGeo
247
247
  fg_ ? @factory._wrap_fg_geom(@fg_geom.difference(fg_), nil) : nil
248
248
  end
249
249
 
250
- alias_method :-, :difference
250
+ alias - difference
251
251
 
252
252
  def sym_difference(rhs_)
253
253
  fg_ = factory._convert_to_fg_geometry(rhs_)
@@ -481,7 +481,7 @@ module RGeo
481
481
  def num_geometries
482
482
  @fg_geom.num_geometries
483
483
  end
484
- alias_method :size, :num_geometries
484
+ alias size num_geometries
485
485
 
486
486
  def geometry_n(n_)
487
487
  if n_ >= 0 && n_ < @fg_geom.num_geometries
@@ -60,9 +60,9 @@ module RGeo
60
60
 
61
61
  def version
62
62
  unless defined?(@version)
63
- if ::RGeo::Geos::CAPI_SUPPORTED
64
- @version = ::RGeo::Geos::CAPIFactory._geos_version.freeze
65
- elsif ::RGeo::Geos::FFI_SUPPORTED
63
+ if RGeo::Geos::CAPI_SUPPORTED
64
+ @version = RGeo::Geos::CAPIFactory._geos_version.freeze
65
+ elsif RGeo::Geos::FFI_SUPPORTED
66
66
  @version = ::Geos::FFIGeos.GEOSversion.sub(/-CAPI-.*$/, "").freeze
67
67
  else
68
68
  @version = nil
@@ -236,7 +236,7 @@ module RGeo
236
236
  def eql?(rhs_)
237
237
  rhs_.is_a?(ZMFactory) && rhs_.z_factory == @zfactory
238
238
  end
239
- alias_method :==, :eql?
239
+ alias == eql?
240
240
 
241
241
  # Standard hash code
242
242
 
@@ -244,7 +244,7 @@ module RGeo
244
244
  @hash ||= [@zfactory, @mfactory].hash
245
245
  end
246
246
 
247
- # See ::RGeo::Feature::Factory#property
247
+ # See RGeo::Feature::Factory#property
248
248
 
249
249
  def property(name_)
250
250
  case name_
@@ -253,85 +253,85 @@ module RGeo
253
253
  end
254
254
  end
255
255
 
256
- # See ::RGeo::Feature::Factory#parse_wkt
256
+ # See RGeo::Feature::Factory#parse_wkt
257
257
 
258
258
  def parse_wkt(str_)
259
259
  @wkt_parser.parse(str_)
260
260
  end
261
261
 
262
- # See ::RGeo::Feature::Factory#parse_wkb
262
+ # See RGeo::Feature::Factory#parse_wkb
263
263
 
264
264
  def parse_wkb(str_)
265
265
  @wkb_parser.parse(str_)
266
266
  end
267
267
 
268
- # See ::RGeo::Feature::Factory#point
268
+ # See RGeo::Feature::Factory#point
269
269
 
270
270
  def point(x_, y_, z_ = 0, m_ = 0)
271
271
  _create_feature(ZMPointImpl, @zfactory.point(x_, y_, z_), @mfactory.point(x_, y_, m_))
272
272
  end
273
273
 
274
- # See ::RGeo::Feature::Factory#line_string
274
+ # See RGeo::Feature::Factory#line_string
275
275
 
276
276
  def line_string(points_)
277
277
  _create_feature(ZMLineStringImpl, @zfactory.line_string(points_), @mfactory.line_string(points_))
278
278
  end
279
279
 
280
- # See ::RGeo::Feature::Factory#line
280
+ # See RGeo::Feature::Factory#line
281
281
 
282
282
  def line(start_, end_)
283
283
  _create_feature(ZMLineImpl, @zfactory.line(start_, end_), @mfactory.line(start_, end_))
284
284
  end
285
285
 
286
- # See ::RGeo::Feature::Factory#linear_ring
286
+ # See RGeo::Feature::Factory#linear_ring
287
287
 
288
288
  def linear_ring(points_)
289
289
  _create_feature(ZMLinearRingImpl, @zfactory.linear_ring(points_), @mfactory.linear_ring(points_))
290
290
  end
291
291
 
292
- # See ::RGeo::Feature::Factory#polygon
292
+ # See RGeo::Feature::Factory#polygon
293
293
 
294
294
  def polygon(outer_ring_, inner_rings_ = nil)
295
295
  _create_feature(ZMPolygonImpl, @zfactory.polygon(outer_ring_, inner_rings_), @mfactory.polygon(outer_ring_, inner_rings_))
296
296
  end
297
297
 
298
- # See ::RGeo::Feature::Factory#collection
298
+ # See RGeo::Feature::Factory#collection
299
299
 
300
300
  def collection(elems_)
301
301
  _create_feature(ZMGeometryCollectionImpl, @zfactory.collection(elems_), @mfactory.collection(elems_))
302
302
  end
303
303
 
304
- # See ::RGeo::Feature::Factory#multi_point
304
+ # See RGeo::Feature::Factory#multi_point
305
305
 
306
306
  def multi_point(elems_)
307
307
  _create_feature(ZMMultiPointImpl, @zfactory.multi_point(elems_), @mfactory.multi_point(elems_))
308
308
  end
309
309
 
310
- # See ::RGeo::Feature::Factory#multi_line_string
310
+ # See RGeo::Feature::Factory#multi_line_string
311
311
 
312
312
  def multi_line_string(elems_)
313
313
  _create_feature(ZMMultiLineStringImpl, @zfactory.multi_line_string(elems_), @mfactory.multi_line_string(elems_))
314
314
  end
315
315
 
316
- # See ::RGeo::Feature::Factory#multi_polygon
316
+ # See RGeo::Feature::Factory#multi_polygon
317
317
 
318
318
  def multi_polygon(elems_)
319
319
  _create_feature(ZMMultiPolygonImpl, @zfactory.multi_polygon(elems_), @mfactory.multi_polygon(elems_))
320
320
  end
321
321
 
322
- # See ::RGeo::Feature::Factory#proj4
322
+ # See RGeo::Feature::Factory#proj4
323
323
 
324
324
  def proj4
325
325
  @zfactory.proj4
326
326
  end
327
327
 
328
- # See ::RGeo::Feature::Factory#coord_sys
328
+ # See RGeo::Feature::Factory#coord_sys
329
329
 
330
330
  def coord_sys
331
331
  @zfactory.coord_sys
332
332
  end
333
333
 
334
- # See ::RGeo::Feature::Factory#override_cast
334
+ # See RGeo::Feature::Factory#override_cast
335
335
 
336
336
  def override_cast(original_, ntype_, flags_)
337
337
  return nil unless Geos.supported?
@@ -372,7 +372,7 @@ module RGeo
372
372
 
373
373
  def _marshal_wkb_generator # :nodoc:
374
374
  unless defined?(@marshal_wkb_generator)
375
- @marshal_wkb_generator = ::RGeo::WKRep::WKBGenerator.new(
375
+ @marshal_wkb_generator = RGeo::WKRep::WKBGenerator.new(
376
376
  type_format: :wkb12)
377
377
  end
378
378
  @marshal_wkb_generator
@@ -380,7 +380,7 @@ module RGeo
380
380
 
381
381
  def _marshal_wkb_parser # :nodoc:
382
382
  unless defined?(@marshal_wkb_parser)
383
- @marshal_wkb_parser = ::RGeo::WKRep::WKBParser.new(self,
383
+ @marshal_wkb_parser = RGeo::WKRep::WKBParser.new(self,
384
384
  support_wkb12: true)
385
385
  end
386
386
  @marshal_wkb_parser
@@ -388,7 +388,7 @@ module RGeo
388
388
 
389
389
  def _psych_wkt_generator # :nodoc:
390
390
  unless defined?(@psych_wkt_generator)
391
- @psych_wkt_generator = ::RGeo::WKRep::WKTGenerator.new(
391
+ @psych_wkt_generator = RGeo::WKRep::WKTGenerator.new(
392
392
  tag_format: :wkt12)
393
393
  end
394
394
  @psych_wkt_generator
@@ -396,7 +396,7 @@ module RGeo
396
396
 
397
397
  def _psych_wkt_parser # :nodoc:
398
398
  unless defined?(@psych_wkt_parser)
399
- @psych_wkt_parser = ::RGeo::WKRep::WKTParser.new(self,
399
+ @psych_wkt_parser = RGeo::WKRep::WKTParser.new(self,
400
400
  support_wkt12: true, support_ewkt: true)
401
401
  end
402
402
  @psych_wkt_parser
@@ -76,44 +76,44 @@ module RGeo
76
76
  end
77
77
 
78
78
  def equals?(rhs_)
79
- @zgeometry.equals?(::RGeo::Feature.cast(rhs_, self).z_geometry)
79
+ @zgeometry.equals?(RGeo::Feature.cast(rhs_, self).z_geometry)
80
80
  end
81
81
 
82
82
  def disjoint?(rhs_)
83
- @zgeometry.disjoint?(::RGeo::Feature.cast(rhs_, self).z_geometry)
83
+ @zgeometry.disjoint?(RGeo::Feature.cast(rhs_, self).z_geometry)
84
84
  end
85
85
 
86
86
  def intersects?(rhs_)
87
- @zgeometry.intersects?(::RGeo::Feature.cast(rhs_, self).z_geometry)
87
+ @zgeometry.intersects?(RGeo::Feature.cast(rhs_, self).z_geometry)
88
88
  end
89
89
 
90
90
  def touches?(rhs_)
91
- @zgeometry.touches?(::RGeo::Feature.cast(rhs_, self).z_geometry)
91
+ @zgeometry.touches?(RGeo::Feature.cast(rhs_, self).z_geometry)
92
92
  end
93
93
 
94
94
  def crosses?(rhs_)
95
- @zgeometry.crosses?(::RGeo::Feature.cast(rhs_, self).z_geometry)
95
+ @zgeometry.crosses?(RGeo::Feature.cast(rhs_, self).z_geometry)
96
96
  end
97
97
 
98
98
  def within?(rhs_)
99
- @zgeometry.within?(::RGeo::Feature.cast(rhs_, self).z_geometry)
99
+ @zgeometry.within?(RGeo::Feature.cast(rhs_, self).z_geometry)
100
100
  end
101
101
 
102
102
  def contains?(rhs_)
103
- @zgeometry.contains?(::RGeo::Feature.cast(rhs_, self).z_geometry)
103
+ @zgeometry.contains?(RGeo::Feature.cast(rhs_, self).z_geometry)
104
104
  end
105
105
 
106
106
  def overlaps?(rhs_)
107
- @zgeometry.overlaps?(::RGeo::Feature.cast(rhs_, self).z_geometry)
107
+ @zgeometry.overlaps?(RGeo::Feature.cast(rhs_, self).z_geometry)
108
108
  end
109
109
 
110
110
  def relate?(rhs_, pattern_)
111
- @zgeometry.relate?(::RGeo::Feature.cast(rhs_, self).z_geometry, pattern_)
111
+ @zgeometry.relate?(RGeo::Feature.cast(rhs_, self).z_geometry, pattern_)
112
112
  end
113
- alias_method :relate, :relate? # DEPRECATED
113
+ alias relate relate? # DEPRECATED
114
114
 
115
115
  def distance(rhs_)
116
- @zgeometry.distance(::RGeo::Feature.cast(rhs_, self).z_geometry)
116
+ @zgeometry.distance(RGeo::Feature.cast(rhs_, self).z_geometry)
117
117
  end
118
118
 
119
119
  def buffer(distance_)
@@ -125,36 +125,36 @@ module RGeo
125
125
  end
126
126
 
127
127
  def intersection(rhs_)
128
- rhs_ = ::RGeo::Feature.cast(rhs_, self)
128
+ rhs_ = RGeo::Feature.cast(rhs_, self)
129
129
  @factory._create_feature(nil, @zgeometry.intersection(rhs_.z_geometry), @mgeometry.intersection(rhs_.m_geometry))
130
130
  end
131
131
 
132
132
  def union(rhs_)
133
- rhs_ = ::RGeo::Feature.cast(rhs_, self)
133
+ rhs_ = RGeo::Feature.cast(rhs_, self)
134
134
  @factory._create_feature(nil, @zgeometry.union(rhs_.z_geometry), @mgeometry.union(rhs_.m_geometry))
135
135
  end
136
136
 
137
137
  def difference(rhs_)
138
- rhs_ = ::RGeo::Feature.cast(rhs_, self)
138
+ rhs_ = RGeo::Feature.cast(rhs_, self)
139
139
  @factory._create_feature(nil, @zgeometry.difference(rhs_.z_geometry), @mgeometry.difference(rhs_.m_geometry))
140
140
  end
141
141
 
142
142
  def sym_difference(rhs_)
143
- rhs_ = ::RGeo::Feature.cast(rhs_, self)
143
+ rhs_ = RGeo::Feature.cast(rhs_, self)
144
144
  @factory._create_feature(nil, @zgeometry.sym_difference(rhs_.z_geometry), @mgeometry.sym_difference(rhs_.m_geometry))
145
145
  end
146
146
 
147
147
  def rep_equals?(rhs_)
148
- rhs_ = ::RGeo::Feature.cast(rhs_, self)
148
+ rhs_ = RGeo::Feature.cast(rhs_, self)
149
149
  rhs_.is_a?(self.class) && @factory.eql?(rhs_.factory) && @zgeometry.rep_equals?(rhs_.z_geometry) && @mgeometry.rep_equals?(rhs_.m_geometry)
150
150
  end
151
151
 
152
- alias_method :eql?, :rep_equals?
153
- alias_method :==, :equals?
152
+ alias eql? rep_equals?
153
+ alias == equals?
154
154
 
155
- alias_method :-, :difference
156
- alias_method :+, :union
157
- alias_method :*, :intersection
155
+ alias - difference
156
+ alias + union
157
+ alias * intersection
158
158
 
159
159
  def _copy_state_from(obj_) # :nodoc:
160
160
  @factory = obj_.factory
@@ -293,12 +293,12 @@ module RGeo
293
293
  def num_geometries
294
294
  @zgeometry.num_geometries
295
295
  end
296
- alias_method :size, :num_geometries
296
+ alias size num_geometries
297
297
 
298
298
  def geometry_n(n_)
299
299
  @factory._create_feature(nil, @zgeometry.geometry_n(n_), @mgeometry.geometry_n(n_))
300
300
  end
301
- alias_method :[], :geometry_n
301
+ alias [] geometry_n
302
302
 
303
303
  def each
304
304
  if block_given?
@@ -1,3 +1,3 @@
1
1
  module RGeo
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.1.1".freeze
3
3
  end
@@ -123,7 +123,7 @@ module RGeo
123
123
  end
124
124
  obj_
125
125
  end
126
- alias_method :parse_hex, :parse
126
+ alias parse_hex parse
127
127
 
128
128
  def _parse_object(contained_) # :nodoc:
129
129
  endian_value_ = _get_byte
@@ -58,7 +58,7 @@ module RGeo
58
58
 
59
59
  # Returns the format for type tags. See WKTGenerator for details.
60
60
  attr_reader :tag_format
61
- alias_method :type_format, :tag_format
61
+ alias type_format tag_format
62
62
 
63
63
  # Returns whether SRID is embedded. See WKTGenerator for details.
64
64
  def emit_ewkt_srid?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgeo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma, Tee Parham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-02 00:00:00.000000000 Z
11
+ date: 2018-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -198,11 +198,7 @@ files:
198
198
  homepage: https://github.com/rgeo/rgeo
199
199
  licenses: []
200
200
  metadata: {}
201
- post_install_message: |2
202
-
203
- rgeo has moved Proj4 support to a separate gem. If you use Proj4, add this to your Gemfile:
204
-
205
- gem "rgeo-proj4"
201
+ post_install_message:
206
202
  rdoc_options: []
207
203
  require_paths:
208
204
  - lib
@@ -210,7 +206,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
206
  requirements:
211
207
  - - ">="
212
208
  - !ruby/object:Gem::Version
213
- version: 2.1.0
209
+ version: 2.2.2
214
210
  required_rubygems_version: !ruby/object:Gem::Requirement
215
211
  requirements:
216
212
  - - ">="
@@ -218,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
214
  version: '0'
219
215
  requirements: []
220
216
  rubyforge_project:
221
- rubygems_version: 2.7.0
217
+ rubygems_version: 2.7.7
222
218
  signing_key:
223
219
  specification_version: 4
224
220
  summary: RGeo is a geospatial data library for Ruby.