rgeo 2.4.0 → 3.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +6 -0
  3. data/README.md +1 -0
  4. data/ext/geos_c_impl/analysis.c +4 -4
  5. data/ext/geos_c_impl/errors.c +8 -6
  6. data/ext/geos_c_impl/errors.h +7 -3
  7. data/ext/geos_c_impl/extconf.rb +2 -0
  8. data/ext/geos_c_impl/factory.c +80 -7
  9. data/ext/geos_c_impl/factory.h +28 -14
  10. data/ext/geos_c_impl/geometry.c +46 -14
  11. data/ext/geos_c_impl/geometry.h +7 -0
  12. data/ext/geos_c_impl/geometry_collection.c +2 -104
  13. data/ext/geos_c_impl/geometry_collection.h +0 -11
  14. data/ext/geos_c_impl/line_string.c +1 -1
  15. data/ext/geos_c_impl/point.c +1 -1
  16. data/ext/geos_c_impl/polygon.c +1 -37
  17. data/ext/geos_c_impl/preface.h +3 -0
  18. data/lib/rgeo/cartesian/calculations.rb +54 -17
  19. data/lib/rgeo/cartesian/factory.rb +0 -7
  20. data/lib/rgeo/cartesian/feature_classes.rb +66 -46
  21. data/lib/rgeo/cartesian/feature_methods.rb +51 -20
  22. data/lib/rgeo/cartesian/interface.rb +0 -6
  23. data/lib/rgeo/cartesian/planar_graph.rb +379 -0
  24. data/lib/rgeo/cartesian/sweepline_intersector.rb +149 -0
  25. data/lib/rgeo/cartesian/valid_op.rb +71 -0
  26. data/lib/rgeo/cartesian.rb +3 -0
  27. data/lib/rgeo/coord_sys/cs/wkt_parser.rb +6 -6
  28. data/lib/rgeo/error.rb +15 -0
  29. data/lib/rgeo/feature/geometry.rb +28 -28
  30. data/lib/rgeo/feature/geometry_collection.rb +13 -5
  31. data/lib/rgeo/feature/line_string.rb +3 -3
  32. data/lib/rgeo/feature/multi_surface.rb +3 -3
  33. data/lib/rgeo/feature/point.rb +4 -4
  34. data/lib/rgeo/feature/surface.rb +3 -3
  35. data/lib/rgeo/geographic/factory.rb +0 -7
  36. data/lib/rgeo/geographic/interface.rb +5 -20
  37. data/lib/rgeo/geographic/proj4_projector.rb +0 -2
  38. data/lib/rgeo/geographic/projected_feature_classes.rb +21 -9
  39. data/lib/rgeo/geographic/projected_feature_methods.rb +51 -28
  40. data/lib/rgeo/geographic/simple_mercator_projector.rb +0 -2
  41. data/lib/rgeo/geographic/spherical_feature_classes.rb +29 -9
  42. data/lib/rgeo/geographic/spherical_feature_methods.rb +62 -1
  43. data/lib/rgeo/geos/capi_factory.rb +21 -31
  44. data/lib/rgeo/geos/capi_feature_classes.rb +35 -11
  45. data/lib/rgeo/geos/ffi_factory.rb +0 -28
  46. data/lib/rgeo/geos/ffi_feature_classes.rb +34 -10
  47. data/lib/rgeo/geos/ffi_feature_methods.rb +23 -5
  48. data/lib/rgeo/geos/interface.rb +0 -7
  49. data/lib/rgeo/geos/zm_factory.rb +0 -12
  50. data/lib/rgeo/impl_helper/basic_geometry_collection_methods.rb +4 -4
  51. data/lib/rgeo/impl_helper/basic_geometry_methods.rb +1 -1
  52. data/lib/rgeo/impl_helper/basic_line_string_methods.rb +15 -19
  53. data/lib/rgeo/impl_helper/basic_point_methods.rb +1 -1
  54. data/lib/rgeo/impl_helper/basic_polygon_methods.rb +1 -1
  55. data/lib/rgeo/impl_helper/valid_op.rb +354 -0
  56. data/lib/rgeo/impl_helper/validity_check.rb +138 -0
  57. data/lib/rgeo/impl_helper.rb +1 -0
  58. data/lib/rgeo/version.rb +1 -1
  59. metadata +31 -10
@@ -90,7 +90,7 @@ module RGeo
90
90
  # operations on them.)
91
91
 
92
92
  def factory
93
- raise Error::UnsupportedOperation, "Method Geometry#factory not defined."
93
+ raise Error::UnsupportedOperation, "Method #{self.class}#factory not defined."
94
94
  end
95
95
 
96
96
  # === SFS 1.1 Description
@@ -105,7 +105,7 @@ module RGeo
105
105
  # point geometries, 1 for curves, and 2 for surfaces.
106
106
 
107
107
  def dimension
108
- raise Error::UnsupportedOperation, "Method Geometry#dimension not defined."
108
+ raise Error::UnsupportedOperation, "Method #{self.class}#dimension not defined."
109
109
  end
110
110
 
111
111
  # === SFS 1.1 Description
@@ -122,7 +122,7 @@ module RGeo
122
122
  # call the +type_name+ method of the returned module.
123
123
 
124
124
  def geometry_type
125
- raise Error::UnsupportedOperation, "Method Geometry#geometry_type not defined."
125
+ raise Error::UnsupportedOperation, "Method #{self.class}#geometry_type not defined."
126
126
  end
127
127
 
128
128
  # === SFS 1.1 Description
@@ -137,7 +137,7 @@ module RGeo
137
137
  # stored in either the same or some other datastore.
138
138
 
139
139
  def srid
140
- raise Error::UnsupportedOperation, "Method Geometry#srid not defined."
140
+ raise Error::UnsupportedOperation, "Method #{self.class}#srid not defined."
141
141
  end
142
142
 
143
143
  # === SFS 1.1 Description
@@ -151,7 +151,7 @@ module RGeo
151
151
  # Returns an object that supports the Geometry interface.
152
152
 
153
153
  def envelope
154
- raise Error::UnsupportedOperation, "Method Geometry#envelope not defined."
154
+ raise Error::UnsupportedOperation, "Method #{self.class}#envelope not defined."
155
155
  end
156
156
 
157
157
  # === SFS 1.1 Description
@@ -164,7 +164,7 @@ module RGeo
164
164
  # Returns an ASCII string.
165
165
 
166
166
  def as_text
167
- raise Error::UnsupportedOperation, "Method Geometry#as_text not defined."
167
+ raise Error::UnsupportedOperation, "Method #{self.class}#as_text not defined."
168
168
  end
169
169
 
170
170
  # === SFS 1.1 Description
@@ -177,7 +177,7 @@ module RGeo
177
177
  # Returns a binary string.
178
178
 
179
179
  def as_binary
180
- raise Error::UnsupportedOperation, "Method Geometry#as_binary not defined."
180
+ raise Error::UnsupportedOperation, "Method #{self.class}#as_binary not defined."
181
181
  end
182
182
 
183
183
  # === SFS 1.1 Description
@@ -192,7 +192,7 @@ module RGeo
192
192
  # specification, which stipulates an integer return value.
193
193
 
194
194
  def empty?
195
- raise Error::UnsupportedOperation, "Method Geometry#empty? not defined."
195
+ raise Error::UnsupportedOperation, "Method #{self.class}#empty? not defined."
196
196
  end
197
197
 
198
198
  def is_empty?
@@ -214,7 +214,7 @@ module RGeo
214
214
  # specification, which stipulates an integer return value.
215
215
 
216
216
  def simple?
217
- raise Error::UnsupportedOperation, "Method Geometry#simple? not defined."
217
+ raise Error::UnsupportedOperation, "Method #{self.class}#simple? not defined."
218
218
  end
219
219
 
220
220
  def is_simple?
@@ -234,7 +234,7 @@ module RGeo
234
234
  # Returns an object that supports the Geometry interface.
235
235
 
236
236
  def boundary
237
- raise Error::UnsupportedOperation, "Method Geometry#boundary not defined."
237
+ raise Error::UnsupportedOperation, "Method #{self.class}#boundary not defined."
238
238
  end
239
239
 
240
240
  # === SFS 1.1 Description
@@ -253,7 +253,7 @@ module RGeo
253
253
  # from different factories is undefined.
254
254
 
255
255
  def equals?(another_geometry)
256
- raise Error::UnsupportedOperation, "Method Geometry#equals? not defined."
256
+ raise Error::UnsupportedOperation, "Method #{self.class}#equals? not defined."
257
257
  end
258
258
 
259
259
  # === SFS 1.1 Description
@@ -272,7 +272,7 @@ module RGeo
272
272
  # from different factories is undefined.
273
273
 
274
274
  def disjoint?(another_geometry)
275
- raise Error::UnsupportedOperation, "Method Geometry#disjoint? not defined."
275
+ raise Error::UnsupportedOperation, "Method #{self.class}#disjoint? not defined."
276
276
  end
277
277
 
278
278
  # === SFS 1.1 Description
@@ -291,7 +291,7 @@ module RGeo
291
291
  # from different factories is undefined.
292
292
 
293
293
  def intersects?(another_geometry)
294
- raise Error::UnsupportedOperation, "Method Geometry#intersects? not defined."
294
+ raise Error::UnsupportedOperation, "Method #{self.class}#intersects? not defined."
295
295
  end
296
296
 
297
297
  # === SFS 1.1 Description
@@ -310,7 +310,7 @@ module RGeo
310
310
  # from different factories is undefined.
311
311
 
312
312
  def touches?(another_geometry)
313
- raise Error::UnsupportedOperation, "Method Geometry#touches? not defined."
313
+ raise Error::UnsupportedOperation, "Method #{self.class}#touches? not defined."
314
314
  end
315
315
 
316
316
  # === SFS 1.1 Description
@@ -329,7 +329,7 @@ module RGeo
329
329
  # from different factories is undefined.
330
330
 
331
331
  def crosses?(another_geometry)
332
- raise Error::UnsupportedOperation, "Method Geometry#crosses? not defined."
332
+ raise Error::UnsupportedOperation, "Method #{self.class}#crosses? not defined."
333
333
  end
334
334
 
335
335
  # === SFS 1.1 Description
@@ -348,7 +348,7 @@ module RGeo
348
348
  # from different factories is undefined.
349
349
 
350
350
  def within?(another_geometry)
351
- raise Error::UnsupportedOperation, "Method Geometry#within? not defined."
351
+ raise Error::UnsupportedOperation, "Method #{self.class}#within? not defined."
352
352
  end
353
353
 
354
354
  # === SFS 1.1 Description
@@ -367,7 +367,7 @@ module RGeo
367
367
  # from different factories is undefined.
368
368
 
369
369
  def contains?(another_geometry)
370
- raise Error::UnsupportedOperation, "Method Geometry#contains? not defined."
370
+ raise Error::UnsupportedOperation, "Method #{self.class}#contains? not defined."
371
371
  end
372
372
 
373
373
  # === SFS 1.1 Description
@@ -386,7 +386,7 @@ module RGeo
386
386
  # from different factories is undefined.
387
387
 
388
388
  def overlaps?(another_geometry)
389
- raise Error::UnsupportedOperation, "Method Geometry#overlaps? not defined."
389
+ raise Error::UnsupportedOperation, "Method #{self.class}#overlaps? not defined."
390
390
  end
391
391
 
392
392
  # === SFS 1.1 Description
@@ -412,7 +412,7 @@ module RGeo
412
412
  # from different factories is undefined.
413
413
 
414
414
  def relate?(another_geometry, _intersection_pattern_matrix_)
415
- raise Error::UnsupportedOperation, "Method Geometry#relate not defined."
415
+ raise Error::UnsupportedOperation, "Method #{self.class}#relate not defined."
416
416
  end
417
417
 
418
418
  # === SFS 1.1 Description
@@ -431,7 +431,7 @@ module RGeo
431
431
  # distance between objects from different factories is undefined.
432
432
 
433
433
  def distance(another_geometry)
434
- raise Error::UnsupportedOperation, "Method Geometry#distance not defined."
434
+ raise Error::UnsupportedOperation, "Method #{self.class}#distance not defined."
435
435
  end
436
436
 
437
437
  # === SFS 1.1 Description
@@ -446,7 +446,7 @@ module RGeo
446
446
  # Returns an object that supports the Geometry interface.
447
447
 
448
448
  def buffer(_distance_)
449
- raise Error::UnsupportedOperation, "Method Geometry#buffer not defined."
449
+ raise Error::UnsupportedOperation, "Method #{self.class}#buffer not defined."
450
450
  end
451
451
 
452
452
  # === SFS 1.1 Description
@@ -459,7 +459,7 @@ module RGeo
459
459
  # Returns an object that supports the Geometry interface.
460
460
 
461
461
  def convex_hull
462
- raise Error::UnsupportedOperation, "Method Geometry#convex_hull not defined."
462
+ raise Error::UnsupportedOperation, "Method #{self.class}#convex_hull not defined."
463
463
  end
464
464
 
465
465
  # === SFS 1.1 Description
@@ -477,7 +477,7 @@ module RGeo
477
477
  # operations on objects from different factories is undefined.
478
478
 
479
479
  def intersection(another_geometry)
480
- raise Error::UnsupportedOperation, "Method Geometry#intersection not defined."
480
+ raise Error::UnsupportedOperation, "Method #{self.class}#intersection not defined."
481
481
  end
482
482
 
483
483
  # === SFS 1.1 Description
@@ -495,7 +495,7 @@ module RGeo
495
495
  # operations on objects from different factories is undefined.
496
496
 
497
497
  def union(another_geometry)
498
- raise Error::UnsupportedOperation, "Method Geometry#union not defined."
498
+ raise Error::UnsupportedOperation, "Method #{self.class}#union not defined."
499
499
  end
500
500
 
501
501
  # === SFS 1.1 Description
@@ -513,7 +513,7 @@ module RGeo
513
513
  # operations on objects from different factories is undefined.
514
514
 
515
515
  def difference(another_geometry)
516
- raise Error::UnsupportedOperation, "Method Geometry#difference not defined."
516
+ raise Error::UnsupportedOperation, "Method #{self.class}#difference not defined."
517
517
  end
518
518
 
519
519
  # === SFS 1.1 Description
@@ -531,7 +531,7 @@ module RGeo
531
531
  # operations on objects from different factories is undefined.
532
532
 
533
533
  def sym_difference(another_geometry)
534
- raise Error::UnsupportedOperation, "Method Geometry#sym_difference not defined."
534
+ raise Error::UnsupportedOperation, "Method #{self.class}#sym_difference not defined."
535
535
  end
536
536
 
537
537
  # Returns true if this geometric object is representationally
@@ -543,7 +543,7 @@ module RGeo
543
543
  # from different factories is undefined.
544
544
 
545
545
  def rep_equals?(another_geometry)
546
- raise Error::UnsupportedOperation, "Method Geometry#rep_equals? not defined."
546
+ raise Error::UnsupportedOperation, "Method #{self.class}#rep_equals? not defined."
547
547
  end
548
548
 
549
549
  # Unions a collection of Geometry or a single Geometry
@@ -560,7 +560,7 @@ module RGeo
560
560
  # returns nil.
561
561
  #
562
562
  def unary_union
563
- raise Error::UnsupportedOperation, "Method Geometry#unary_union not defined."
563
+ raise Error::UnsupportedOperation, "Method #{self.class}#unary_union not defined."
564
564
  end
565
565
 
566
566
  # This method should behave almost the same as the rep_equals?
@@ -44,7 +44,7 @@ module RGeo
44
44
  # Returns an integer.
45
45
 
46
46
  def num_geometries
47
- raise Error::UnsupportedOperation, "Method GeometryCollection#num_geometries not defined."
47
+ raise Error::UnsupportedOperation, "Method #{self.class}#num_geometries not defined."
48
48
  end
49
49
 
50
50
  # === SFS 1.1 Description
@@ -59,7 +59,7 @@ module RGeo
59
59
  # in that it does not support negative indexes.
60
60
 
61
61
  def geometry_n(n)
62
- raise Error::UnsupportedOperation, "Method GeometryCollection#geometry_n not defined."
62
+ raise Error::UnsupportedOperation, "Method #{self.class}#geometry_n not defined."
63
63
  end
64
64
 
65
65
  # Alias of the num_geometries method.
@@ -79,13 +79,13 @@ module RGeo
79
79
  # returns nil, where [-1] returns the last element of the collection.
80
80
 
81
81
  def [](n)
82
- raise Error::UnsupportedOperation, "Method GeometryCollection#[] not defined."
82
+ raise Error::UnsupportedOperation, "Method #{self.class}#[] not defined."
83
83
  end
84
84
 
85
85
  # Nodes the linework in a list of Geometries
86
86
  #
87
87
  def node
88
- raise Error::UnsupportedOperation, "Method GeometryCollection#node not defined."
88
+ raise Error::UnsupportedOperation, "Method #{self.class}#node not defined."
89
89
  end
90
90
 
91
91
  # Iterates over the geometries of this GeometryCollection.
@@ -96,7 +96,15 @@ module RGeo
96
96
  # include the Enumerable mixin.
97
97
 
98
98
  def each(&block)
99
- raise Error::UnsupportedOperation, "Method GeometryCollection#each not defined."
99
+ raise Error::UnsupportedOperation, "Method #{self.class}#each not defined."
100
+ end
101
+
102
+ # Gives a point that is guaranteed to be within the geometry.
103
+ #
104
+ # Extends OGC SFS 1.1 and follows PostGIS standards.
105
+ # @see https://postgis.net/docs/ST_PointOnSurface.html
106
+ def point_on_surface
107
+ raise Error::UnsupportedOperation, "Method #{self.class}#each not defined."
100
108
  end
101
109
  end
102
110
  end
@@ -34,7 +34,7 @@ module RGeo
34
34
  # Returns an integer.
35
35
 
36
36
  def num_points
37
- raise Error::UnsupportedOperation, "Method LineString#num_points not defined."
37
+ raise Error::UnsupportedOperation, "Method #{self.class}#num_points not defined."
38
38
  end
39
39
 
40
40
  # === SFS 1.1 Description
@@ -48,14 +48,14 @@ module RGeo
48
48
  # Does not support negative indexes.
49
49
 
50
50
  def point_n(n)
51
- raise Error::UnsupportedOperation, "Method LineString#point_n not defined."
51
+ raise Error::UnsupportedOperation, "Method #{self.class}#point_n not defined."
52
52
  end
53
53
 
54
54
  # Returns the constituent points as an array of objects that
55
55
  # support the Point interface.
56
56
 
57
57
  def points
58
- raise Error::UnsupportedOperation, "Method LineString#points not defined."
58
+ raise Error::UnsupportedOperation, "Method #{self.class}#points not defined."
59
59
  end
60
60
  end
61
61
  end
@@ -43,7 +43,7 @@ module RGeo
43
43
  # Returns a floating-point scalar value.
44
44
 
45
45
  def area
46
- raise Error::UnsupportedOperation, "Method MultiSurface#area not defined."
46
+ raise Error::UnsupportedOperation, "Method #{self.class}#area not defined."
47
47
  end
48
48
 
49
49
  # === SFS 1.1 Description
@@ -56,7 +56,7 @@ module RGeo
56
56
  # Returns an object that supports the Point interface.
57
57
 
58
58
  def centroid
59
- raise Error::UnsupportedOperation, "Method MultiSurface#centroid not defined."
59
+ raise Error::UnsupportedOperation, "Method #{self.class}#centroid not defined."
60
60
  end
61
61
 
62
62
  # === SFS 1.1 Description
@@ -68,7 +68,7 @@ module RGeo
68
68
  # Returns an object that supports the Point interface.
69
69
 
70
70
  def point_on_surface
71
- raise Error::UnsupportedOperation, "Method MultiSurface#point_on_surface not defined."
71
+ raise Error::UnsupportedOperation, "Method #{self.class}#point_on_surface not defined."
72
72
  end
73
73
  end
74
74
  end
@@ -47,7 +47,7 @@ module RGeo
47
47
  # Returns a floating-point scalar value.
48
48
 
49
49
  def x
50
- raise Error::UnsupportedOperation, "Method Point#x not defined."
50
+ raise Error::UnsupportedOperation, "Method #{self.class}#x not defined."
51
51
  end
52
52
 
53
53
  # === SFS 1.1 Description
@@ -59,7 +59,7 @@ module RGeo
59
59
  # Returns a floating-point scalar value.
60
60
 
61
61
  def y
62
- raise Error::UnsupportedOperation, "Method Point#y not defined."
62
+ raise Error::UnsupportedOperation, "Method #{self.class}#y not defined."
63
63
  end
64
64
 
65
65
  # Returns the z-coordinate for this Point as a floating-point
@@ -69,7 +69,7 @@ module RGeo
69
69
  # not support Z coordinates.
70
70
 
71
71
  def z
72
- raise Error::UnsupportedOperation, "Method Point#z not defined."
72
+ raise Error::UnsupportedOperation, "Method #{self.class}#z not defined."
73
73
  end
74
74
 
75
75
  # Returns the m-coordinate for this Point as a floating-point
@@ -79,7 +79,7 @@ module RGeo
79
79
  # not support M coordinates.
80
80
 
81
81
  def m
82
- raise Error::UnsupportedOperation, "Method Point#m not defined."
82
+ raise Error::UnsupportedOperation, "Method #{self.class}#m not defined."
83
83
  end
84
84
  end
85
85
  end
@@ -49,7 +49,7 @@ module RGeo
49
49
  # Returns a floating-point scalar value.
50
50
 
51
51
  def area
52
- raise Error::UnsupportedOperation, "Method Surface#area not defined."
52
+ raise Error::UnsupportedOperation, "Method #{self.class.name}#area not defined."
53
53
  end
54
54
 
55
55
  # === SFS 1.1 Description
@@ -62,7 +62,7 @@ module RGeo
62
62
  # Returns an object that supports the Point interface.
63
63
 
64
64
  def centroid
65
- raise Error::UnsupportedOperation, "Method Surface#centroid not defined."
65
+ raise Error::UnsupportedOperation, "Method #{self.class.name}#centroid not defined."
66
66
  end
67
67
 
68
68
  # === SFS 1.1 Description
@@ -74,7 +74,7 @@ module RGeo
74
74
  # Returns an object that supports the Point interface.
75
75
 
76
76
  def point_on_surface
77
- raise Error::UnsupportedOperation, "Method Surface#point_on_surface not defined."
77
+ raise Error::UnsupportedOperation, "Method #{self.class.name}#point_on_surface not defined."
78
78
  end
79
79
  end
80
80
  end
@@ -42,7 +42,6 @@ module RGeo
42
42
  if @coord_sys.is_a?(String)
43
43
  @coord_sys = CoordSys::CS.create_from_wkt(@coord_sys)
44
44
  end
45
- @lenient_assertions = opts[:uses_lenient_assertions] ? true : false
46
45
  @buffer_resolution = opts[:buffer_resolution].to_i
47
46
  @buffer_resolution = 1 if @buffer_resolution < 1
48
47
 
@@ -106,7 +105,6 @@ module RGeo
106
105
  "wkbg" => @wkb_generator.properties,
107
106
  "wktp" => @wkt_parser.properties,
108
107
  "wkbp" => @wkb_parser.properties,
109
- "lena" => @lenient_assertions,
110
108
  "bufr" => @buffer_resolution
111
109
  }
112
110
  hash_["proj4"] = @proj4.marshal_dump if @proj4
@@ -138,7 +136,6 @@ module RGeo
138
136
  wkb_generator: symbolize_hash(data_["wkbg"]),
139
137
  wkt_parser: symbolize_hash(data_["wktp"]),
140
138
  wkb_parser: symbolize_hash(data_["wkbp"]),
141
- uses_lenient_assertions: data_["lena"],
142
139
  buffer_resolution: data_["bufr"],
143
140
  proj4: proj4,
144
141
  coord_sys: coord_sys
@@ -164,7 +161,6 @@ module RGeo
164
161
  coder["wkb_generator"] = @wkb_generator.properties
165
162
  coder["wkt_parser"] = @wkt_parser.properties
166
163
  coder["wkb_parser"] = @wkb_parser.properties
167
- coder["lenient_assertions"] = @lenient_assertions
168
164
  coder["buffer_resolution"] = @buffer_resolution
169
165
  if @proj4
170
166
  str = @proj4.original_str || @proj4.canonical_str
@@ -201,7 +197,6 @@ module RGeo
201
197
  wkb_generator: symbolize_hash(coder["wkb_generator"]),
202
198
  wkt_parser: symbolize_hash(coder["wkt_parser"]),
203
199
  wkb_parser: symbolize_hash(coder["wkb_parser"]),
204
- uses_lenient_assertions: coder["lenient_assertions"],
205
200
  buffer_resolution: coder["buffer_resolution"],
206
201
  proj4: proj4,
207
202
  coord_sys: coord_sys
@@ -293,8 +288,6 @@ module RGeo
293
288
  @support_z
294
289
  when :has_m_coordinate
295
290
  @support_m
296
- when :uses_lenient_assertions
297
- @lenient_assertions
298
291
  when :buffer_resolution
299
292
  @buffer_resolution
300
293
  when :is_geographic
@@ -54,12 +54,6 @@ module RGeo
54
54
  # Support a Z coordinate. Default is false.
55
55
  # [<tt>:has_m_coordinate</tt>]
56
56
  # Support an M coordinate. Default is false.
57
- # [<tt>:uses_lenient_assertions</tt>]
58
- # If set to true, assertion checking is disabled. This includes
59
- # simplicity checking on LinearRing, and validity checks on
60
- # Polygon and MultiPolygon. This may speed up creation of certain
61
- # objects, at the expense of not doing the proper checking for
62
- # OGC compliance. Default is false.
63
57
  # [<tt>:buffer_resolution</tt>]
64
58
  # The resolution of buffers around geometries created by this
65
59
  # factory. This controls the number of line segments used to
@@ -131,7 +125,6 @@ module RGeo
131
125
  has_m_coordinate: opts[:has_m_coordinate],
132
126
  proj4: proj4 || proj_4055,
133
127
  coord_sys: coord_sys || coord_sys_4055,
134
- uses_lenient_assertions: opts[:uses_lenient_assertions],
135
128
  buffer_resolution: opts[:buffer_resolution],
136
129
  wkt_parser: opts[:wkt_parser],
137
130
  wkb_parser: opts[:wkb_parser],
@@ -207,10 +200,8 @@ module RGeo
207
200
  #
208
201
  # You may also provide options understood by the underlying
209
202
  # projected Cartesian factory. For example, if GEOS is used for the
210
- # projected factory, you may also set the
211
- # <tt>:lenient_multi_polygon_assertions</tt> and
212
- # <tt>:buffer_resolution</tt> options. See RGeo::Geos.factory for
213
- # more details.
203
+ # projected factory, you may also set the <tt>:buffer_resolution</tt>
204
+ # options. See RGeo::Geos.factory for more details.
214
205
 
215
206
  def simple_mercator_factory(opts = {})
216
207
  factory = Geographic::Factory.new("Projected",
@@ -222,12 +213,9 @@ module RGeo
222
213
  wkt_generator: opts[:wkt_generator],
223
214
  wkb_generator: opts[:wkb_generator],
224
215
  has_z_coordinate: opts[:has_z_coordinate],
225
- has_m_coordinate: opts[:has_m_coordinate],
226
- uses_lenient_assertions: opts[:uses_lenient_assertions])
216
+ has_m_coordinate: opts[:has_m_coordinate])
227
217
  projector = Geographic::SimpleMercatorProjector.new(factory,
228
218
  buffer_resolution: opts[:buffer_resolution],
229
- lenient_multi_polygon_assertions: opts[:lenient_multi_polygon_assertions],
230
- uses_lenient_assertions: opts[:uses_lenient_assertions],
231
219
  has_z_coordinate: opts[:has_z_coordinate],
232
220
  has_m_coordinate: opts[:has_m_coordinate])
233
221
  factory.projector = projector
@@ -342,9 +330,8 @@ module RGeo
342
330
  # If a <tt>:projection_factory</tt> is _not_ provided, you may also
343
331
  # provide options for configuring the projected Cartesian factory.
344
332
  # For example, if GEOS is used for the projected factory, you may
345
- # also set the <tt>:lenient_multi_polygon_assertions</tt> and
346
- # <tt>:buffer_resolution</tt> options. See RGeo::Geos.factory for
347
- # more details.
333
+ # also set the <tt>:buffer_resolution</tt> option. See RGeo::Geos.factory
334
+ # for more details.
348
335
 
349
336
  def projected_factory(opts = {})
350
337
  CoordSys.check!(:proj4)
@@ -447,8 +434,6 @@ module RGeo
447
434
  srid: projection_srid,
448
435
  coord_sys: projection_coord_sys,
449
436
  buffer_resolution: opts[:buffer_resolution],
450
- lenient_multi_polygon_assertions: opts[:lenient_multi_polygon_assertions],
451
- uses_lenient_assertions: opts[:uses_lenient_assertions],
452
437
  has_z_coordinate: opts[:has_z_coordinate],
453
438
  has_m_coordinate: opts[:has_m_coordinate],
454
439
  wkt_parser: opts[:wkt_parser], wkt_generator: opts[:wkt_generator],
@@ -48,8 +48,6 @@ module RGeo
48
48
  proj4: proj4,
49
49
  coord_sys: opts[:coord_sys], srid: opts[:srid],
50
50
  buffer_resolution: opts[:buffer_resolution],
51
- lenient_multi_polygon_assertions: opts[:lenient_multi_polygon_assertions],
52
- uses_lenient_assertions: opts[:uses_lenient_assertions],
53
51
  has_z_coordinate: opts[:has_z_coordinate],
54
52
  has_m_coordinate: opts[:has_m_coordinate],
55
53
  wkt_parser: opts[:wkt_parser], wkt_generator: opts[:wkt_generator],
@@ -8,16 +8,18 @@
8
8
 
9
9
  module RGeo
10
10
  module Geographic
11
- class ProjectedPointImpl # :nodoc:
11
+ class ProjectedPointImpl
12
12
  include Feature::Point
13
+ include ImplHelper::ValidityCheck
13
14
  include ImplHelper::BasicGeometryMethods
14
15
  include ImplHelper::BasicPointMethods
15
16
  include ProjectedGeometryMethods
16
17
  include ProjectedPointMethods
17
18
  end
18
19
 
19
- class ProjectedLineStringImpl # :nodoc:
20
+ class ProjectedLineStringImpl
20
21
  include Feature::LineString
22
+ include ImplHelper::ValidityCheck
21
23
  include ImplHelper::BasicGeometryMethods
22
24
  include ImplHelper::BasicLineStringMethods
23
25
  include ProjectedGeometryMethods
@@ -25,18 +27,21 @@ module RGeo
25
27
  include ProjectedLineStringMethods
26
28
  end
27
29
 
28
- class ProjectedLinearRingImpl # :nodoc:
30
+ class ProjectedLinearRingImpl
29
31
  include Feature::LinearRing
32
+ include ImplHelper::ValidityCheck
30
33
  include ImplHelper::BasicGeometryMethods
31
34
  include ImplHelper::BasicLineStringMethods
32
35
  include ImplHelper::BasicLinearRingMethods
33
36
  include ProjectedGeometryMethods
34
37
  include ProjectedNCurveMethods
35
38
  include ProjectedLineStringMethods
39
+ include ProjectedLinearRingMethods
36
40
  end
37
41
 
38
- class ProjectedLineImpl # :nodoc:
42
+ class ProjectedLineImpl
39
43
  include Feature::Line
44
+ include ImplHelper::ValidityCheck
40
45
  include ImplHelper::BasicGeometryMethods
41
46
  include ImplHelper::BasicLineStringMethods
42
47
  include ImplHelper::BasicLineMethods
@@ -45,8 +50,9 @@ module RGeo
45
50
  include ProjectedLineStringMethods
46
51
  end
47
52
 
48
- class ProjectedPolygonImpl # :nodoc:
53
+ class ProjectedPolygonImpl
49
54
  include Feature::Polygon
55
+ include ImplHelper::ValidityCheck
50
56
  include ImplHelper::BasicGeometryMethods
51
57
  include ImplHelper::BasicPolygonMethods
52
58
  include ProjectedGeometryMethods
@@ -54,23 +60,26 @@ module RGeo
54
60
  include ProjectedPolygonMethods
55
61
  end
56
62
 
57
- class ProjectedGeometryCollectionImpl # :nodoc:
63
+ class ProjectedGeometryCollectionImpl
58
64
  include Feature::GeometryCollection
65
+ include ImplHelper::ValidityCheck
59
66
  include ImplHelper::BasicGeometryMethods
60
67
  include ImplHelper::BasicGeometryCollectionMethods
61
68
  include ProjectedGeometryMethods
62
69
  end
63
70
 
64
- class ProjectedMultiPointImpl # :nodoc:
71
+ class ProjectedMultiPointImpl
65
72
  include Feature::MultiPoint
73
+ include ImplHelper::ValidityCheck
66
74
  include ImplHelper::BasicGeometryMethods
67
75
  include ImplHelper::BasicGeometryCollectionMethods
68
76
  include ImplHelper::BasicMultiPointMethods
69
77
  include ProjectedGeometryMethods
70
78
  end
71
79
 
72
- class ProjectedMultiLineStringImpl # :nodoc:
80
+ class ProjectedMultiLineStringImpl
73
81
  include Feature::MultiLineString
82
+ include ImplHelper::ValidityCheck
74
83
  include ImplHelper::BasicGeometryMethods
75
84
  include ImplHelper::BasicGeometryCollectionMethods
76
85
  include ImplHelper::BasicMultiLineStringMethods
@@ -78,8 +87,9 @@ module RGeo
78
87
  include ProjectedNCurveMethods
79
88
  end
80
89
 
81
- class ProjectedMultiPolygonImpl # :nodoc:
90
+ class ProjectedMultiPolygonImpl
82
91
  include Feature::MultiPolygon
92
+ include ImplHelper::ValidityCheck
83
93
  include ImplHelper::BasicGeometryMethods
84
94
  include ImplHelper::BasicGeometryCollectionMethods
85
95
  include ImplHelper::BasicMultiPolygonMethods
@@ -87,5 +97,7 @@ module RGeo
87
97
  include ProjectedNSurfaceMethods
88
98
  include ProjectedMultiPolygonMethods
89
99
  end
100
+
101
+ ImplHelper::ValidityCheck.override_classes
90
102
  end
91
103
  end