ffi-geos 1.1.0 → 1.1.1

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: 105d67e566f0d38c5d679438643095c0b633c7cc
4
- data.tar.gz: e1b981680f31f9b0b71cb8057ca4e588e03d5d04
3
+ metadata.gz: 8a4b9c08a3bc02eae724aa2cadfc9ece840ac21a
4
+ data.tar.gz: f7cd4fad310f187c6d89314c286ac541c7c9ab43
5
5
  SHA512:
6
- metadata.gz: abb46c8314cfe017c9802c97b42f621e8ff2f1b84b5a23ca46b26d9ccaf2cefeb77731febde0b70350fed80b3f4c7d0a67373a5779abaad514293c47c3df5126
7
- data.tar.gz: d79aa2d5154f1ed6f1bf10001a7a849ccff83f3f08d8b4f4c35fb158bbd8e8ce6296db127632bd47d9389993dcc2cdf6bbe4f487d4fc0c52bd2257383531e0ea
6
+ metadata.gz: 8948b1bb43ed78ae20cfbe273b77c9795b6ec90f475ae7b42b627c76ae11cbdebc4e9ad7e31b63b3e20cc21283595c422e3fd14e2878988b350cff859fc6f50f
7
+ data.tar.gz: 4280e8773e0ad61616e54066a98131fcbc9849a692e1c433e5d93534e2294cefa39926b751e7a0fddeee61bbe1cb764ec256b68ded7757a45d0832e4f89e3e6c
@@ -1,22 +1,22 @@
1
- Copyright (c) 2010-2015 J Smith <dark.panda@gmail.com>
2
-
3
- Permission is hereby granted, free of charge, to any person
4
- obtaining a copy of this software and associated documentation
5
- files (the "Software"), to deal in the Software without
6
- restriction, including without limitation the rights to use,
7
- copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the
9
- Software is furnished to do so, subject to the following
10
- conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2010-2016 J Smith <dark.panda@gmail.com>
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -56,7 +56,6 @@ module Geos
56
56
  elsif FFI::Platform::IS_WINDOWS
57
57
  ENV['PATH'].split(File::PATH_SEPARATOR)
58
58
  else
59
- [ '/usr/local/{lib64,lib}', '/opt/local/{lib64,lib}', '/usr/{lib64,lib}' ]
60
59
  [ '/usr/local/{lib64,lib}', '/opt/local/{lib64,lib}', '/usr/{lib64,lib}', '/usr/lib/{x86_64,i386}-linux-gnu' ]
61
60
  end
62
61
  end
@@ -67,7 +66,7 @@ module Geos
67
66
  ENV['GEOS_LIBRARY_PATH']
68
67
  else
69
68
  Dir.glob(search_paths.map { |path|
70
- File.expand_path(File.join(path, "#{lib}.#{FFI::Platform::LIBSUFFIX}"))
69
+ File.expand_path(File.join(path, "#{lib}.#{FFI::Platform::LIBSUFFIX}{,.?}"))
71
70
  }).first
72
71
  end
73
72
  end
@@ -155,7 +155,7 @@ module Geos
155
155
  self.to_a[*args]
156
156
  end
157
157
  end
158
- alias :slice :[]
158
+ alias_method :slice, :[]
159
159
 
160
160
  def has_z?
161
161
  self.dimensions == 3
@@ -220,7 +220,7 @@ module Geos
220
220
  FFIGeos.GEOSCoordSeq_getSize_r(Geos.current_handle, self.ptr, int_ptr)
221
221
  int_ptr.read_int
222
222
  end
223
- alias :size :length
223
+ alias_method :size, :length
224
224
 
225
225
  def empty?
226
226
  self.length == 0
@@ -59,7 +59,7 @@ module Geos
59
59
 
60
60
  self
61
61
  end
62
- alias :normalize :normalize!
62
+ alias_method :normalize, :normalize!
63
63
 
64
64
  def srid
65
65
  FFIGeos.GEOSGetSRID_r(Geos.current_handle, self.ptr)
@@ -156,7 +156,7 @@ module Geos
156
156
  :srid_copy => pick_srid_from_geoms(self.srid, geom.srid)
157
157
  })
158
158
  end
159
- alias :symmetric_difference :sym_difference
159
+ alias_method :symmetric_difference, :sym_difference
160
160
 
161
161
  def boundary
162
162
  cast_geometry_ptr(FFIGeos.GEOSBoundary_r(Geos.current_handle, self.ptr), :srid_copy => self.srid)
@@ -205,20 +205,20 @@ module Geos
205
205
  def point_on_surface
206
206
  cast_geometry_ptr(FFIGeos.GEOSPointOnSurface_r(Geos.current_handle, self.ptr), :srid_copy => self.srid)
207
207
  end
208
- alias :representative_point :point_on_surface
208
+ alias_method :representative_point, :point_on_surface
209
209
 
210
210
  if FFIGeos.respond_to?(:GEOSClipByRect_r)
211
211
  # Available in GEOS 3.5.0+.
212
212
  def clip_by_rect(xmin, ymin, xmax, ymax)
213
213
  cast_geometry_ptr(FFIGeos.GEOSClipByRect_r(Geos.current_handle, self.ptr, xmin, ymin, xmax, ymax))
214
214
  end
215
- alias :clip_by_rectangle :clip_by_rect
215
+ alias_method :clip_by_rectangle, :clip_by_rect
216
216
  end
217
217
 
218
218
  def centroid
219
219
  cast_geometry_ptr(FFIGeos.GEOSGetCentroid_r(Geos.current_handle, self.ptr), :srid_copy => self.srid)
220
220
  end
221
- alias :center :centroid
221
+ alias_method :center, :centroid
222
222
 
223
223
  def envelope
224
224
  cast_geometry_ptr(FFIGeos.GEOSEnvelope_r(Geos.current_handle, self.ptr), :srid_copy => self.srid)
@@ -261,7 +261,7 @@ module Geos
261
261
  def extract_unique_points
262
262
  cast_geometry_ptr(FFIGeos.GEOSGeom_extractUniquePoints_r(Geos.current_handle, self.ptr), :srid_copy => self.srid)
263
263
  end
264
- alias :unique_points :extract_unique_points
264
+ alias_method :unique_points, :extract_unique_points
265
265
 
266
266
  def disjoint?(geom)
267
267
  check_geometry(geom)
@@ -346,7 +346,7 @@ module Geos
346
346
  check_geometry(geom)
347
347
  bool_result(FFIGeos.GEOSEquals_r(Geos.current_handle, self.ptr, geom.ptr))
348
348
  end
349
- alias :equals? :eql?
349
+ alias_method :equals?, :eql?
350
350
 
351
351
  def ==(geom)
352
352
  if geom.is_a?(Geos::Geometry)
@@ -360,15 +360,15 @@ module Geos
360
360
  check_geometry(geom)
361
361
  bool_result(FFIGeos.GEOSEqualsExact_r(Geos.current_handle, self.ptr, geom.ptr, tolerance))
362
362
  end
363
- alias :equals_exact? :eql_exact?
364
- alias :exactly_equals? :eql_exact?
363
+ alias_method :equals_exact?, :eql_exact?
364
+ alias_method :exactly_equals?, :eql_exact?
365
365
 
366
366
  def eql_almost?(geom, decimal = 6)
367
367
  check_geometry(geom)
368
368
  bool_result(FFIGeos.GEOSEqualsExact_r(Geos.current_handle, self.ptr, geom.ptr, 0.5 * 10 ** (-decimal)))
369
369
  end
370
- alias :equals_almost? :eql_almost?
371
- alias :almost_equals? :eql_almost?
370
+ alias_method :equals_almost?, :eql_almost?
371
+ alias_method :almost_equals?, :eql_almost?
372
372
 
373
373
  def empty?
374
374
  bool_result(FFIGeos.GEOSisEmpty_r(Geos.current_handle, self.ptr))
@@ -519,7 +519,7 @@ module Geos
519
519
  :srid_copy => pick_srid_from_geoms(self.srid, geom.srid)
520
520
  })
521
521
  end
522
- alias :snap_to :snap
522
+ alias_method :snap_to, :snap
523
523
 
524
524
  def shared_paths(geom)
525
525
  check_geometry(geom)
@@ -25,7 +25,7 @@ module Geos
25
25
  cast_geometry_ptr(FFIGeos.GEOSGetGeometryN_r(Geos.current_handle, self.ptr, n), :auto_free => false)
26
26
  end
27
27
  end
28
- alias :geometry_n :get_geometry_n
28
+ alias_method :geometry_n, :get_geometry_n
29
29
 
30
30
  def [](*args)
31
31
  if args.length == 1 && args.first.is_a?(Numeric) && args.first >= 0
@@ -34,7 +34,7 @@ module Geos
34
34
  self.to_a[*args]
35
35
  end
36
36
  end
37
- alias :slice :[]
38
- alias :at :[]
37
+ alias_method :slice, :[]
38
+ alias_method :at, :[]
39
39
  end
40
40
  end
@@ -46,7 +46,7 @@ module Geos
46
46
  self.to_a[*args]
47
47
  end
48
48
  end
49
- alias :slice :[]
49
+ alias_method :slice, :[]
50
50
 
51
51
  def offset_curve(width, options = {})
52
52
  options = Constants::BUFFER_PARAM_DEFAULTS.merge(options)
@@ -13,7 +13,7 @@ module Geos
13
13
  self.coord_seq.get_x(0)
14
14
  end
15
15
  end
16
- alias :x :get_x
16
+ alias_method :x, :get_x
17
17
 
18
18
  if FFIGeos.respond_to?(:GEOSGeomGetY_r)
19
19
  def get_y
@@ -26,7 +26,7 @@ module Geos
26
26
  self.coord_seq.get_y(0)
27
27
  end
28
28
  end
29
- alias :y :get_y
29
+ alias_method :y, :get_y
30
30
 
31
31
  if FFIGeos.respond_to?(:GEOSGeomGetZ_r)
32
32
  def get_z
@@ -39,7 +39,7 @@ module Geos
39
39
  self.coord_seq.get_z(0)
40
40
  end
41
41
  end
42
- alias :z :get_z
42
+ alias_method :z, :get_z
43
43
 
44
44
  def area
45
45
  0
@@ -60,7 +60,7 @@ module Geos
60
60
  def normalize!
61
61
  self
62
62
  end
63
- alias :normalize :normalize!
63
+ alias_method :normalize, :normalize!
64
64
 
65
65
  %w{
66
66
  convex_hull
@@ -19,7 +19,7 @@ module Geos
19
19
  )
20
20
  end
21
21
  end
22
- alias :interior_ring :interior_ring_n
22
+ alias_method :interior_ring, :interior_ring_n
23
23
 
24
24
  def exterior_ring
25
25
  cast_geometry_ptr(
@@ -171,7 +171,7 @@ module Geos
171
171
  }
172
172
  }.compact
173
173
  end
174
- alias :query_geoms :query_geometries
174
+ alias_method :query_geoms, :query_geometries
175
175
 
176
176
  def iterate
177
177
  @storage.values.each do |v|
@@ -78,7 +78,7 @@ module Geos
78
78
 
79
79
  cs.ptr.autorelease = false
80
80
 
81
- ret = cast_geometry_ptr(FFIGeos.GEOSGeom_createLinearRing_r(Geos.current_handle, cs.ptr), {
81
+ cast_geometry_ptr(FFIGeos.GEOSGeom_createLinearRing_r(Geos.current_handle, cs.ptr), {
82
82
  :srid => options[:srid]
83
83
  })
84
84
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Geos
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1".freeze
5
5
  end
6
6
 
metadata CHANGED
@@ -1,24 +1,24 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-geos
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - J Smith
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-09 00:00:00.000000000 Z
11
+ date: 2016-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: ffi
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
18
  version: 1.0.0
20
- type: :runtime
19
+ name: ffi
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
@@ -84,7 +84,7 @@ homepage: http://github.com/dark-panda/ffi-geos
84
84
  licenses:
85
85
  - MIT
86
86
  metadata: {}
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -99,9 +99,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubyforge_project:
103
- rubygems_version: 2.2.5
104
- signing_key:
102
+ rubyforge_project:
103
+ rubygems_version: 2.4.8
104
+ signing_key:
105
105
  specification_version: 4
106
106
  summary: An ffi wrapper for GEOS, a C++ port of the Java Topology Suite (JTS).
107
107
  test_files: