rgeo 2.3.1 → 3.0.0.pre.rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +6 -0
  3. data/README.md +11 -10
  4. data/ext/geos_c_impl/analysis.c +8 -6
  5. data/ext/geos_c_impl/analysis.h +1 -3
  6. data/ext/geos_c_impl/errors.c +10 -8
  7. data/ext/geos_c_impl/errors.h +7 -3
  8. data/ext/geos_c_impl/extconf.rb +3 -0
  9. data/ext/geos_c_impl/factory.c +273 -202
  10. data/ext/geos_c_impl/factory.h +51 -63
  11. data/ext/geos_c_impl/geometry.c +124 -22
  12. data/ext/geos_c_impl/geometry.h +8 -3
  13. data/ext/geos_c_impl/geometry_collection.c +81 -185
  14. data/ext/geos_c_impl/geometry_collection.h +1 -14
  15. data/ext/geos_c_impl/globals.c +91 -0
  16. data/ext/geos_c_impl/globals.h +45 -0
  17. data/ext/geos_c_impl/line_string.c +28 -29
  18. data/ext/geos_c_impl/line_string.h +1 -3
  19. data/ext/geos_c_impl/main.c +10 -9
  20. data/ext/geos_c_impl/point.c +9 -8
  21. data/ext/geos_c_impl/point.h +1 -3
  22. data/ext/geos_c_impl/polygon.c +43 -72
  23. data/ext/geos_c_impl/polygon.h +1 -3
  24. data/ext/geos_c_impl/preface.h +12 -0
  25. data/ext/geos_c_impl/ruby_more.c +65 -0
  26. data/ext/geos_c_impl/ruby_more.h +16 -0
  27. data/lib/rgeo/cartesian/calculations.rb +54 -17
  28. data/lib/rgeo/cartesian/factory.rb +6 -14
  29. data/lib/rgeo/cartesian/feature_classes.rb +68 -46
  30. data/lib/rgeo/cartesian/feature_methods.rb +67 -20
  31. data/lib/rgeo/cartesian/interface.rb +0 -36
  32. data/lib/rgeo/cartesian/planar_graph.rb +379 -0
  33. data/lib/rgeo/cartesian/sweepline_intersector.rb +149 -0
  34. data/lib/rgeo/cartesian/valid_op.rb +71 -0
  35. data/lib/rgeo/cartesian.rb +3 -0
  36. data/lib/rgeo/coord_sys/cs/wkt_parser.rb +6 -6
  37. data/lib/rgeo/coord_sys.rb +0 -11
  38. data/lib/rgeo/error.rb +15 -0
  39. data/lib/rgeo/feature/factory_generator.rb +0 -3
  40. data/lib/rgeo/feature/geometry.rb +107 -28
  41. data/lib/rgeo/feature/geometry_collection.rb +13 -5
  42. data/lib/rgeo/feature/line_string.rb +3 -3
  43. data/lib/rgeo/feature/multi_surface.rb +3 -3
  44. data/lib/rgeo/feature/point.rb +4 -4
  45. data/lib/rgeo/feature/surface.rb +3 -3
  46. data/lib/rgeo/geographic/factory.rb +6 -7
  47. data/lib/rgeo/geographic/interface.rb +6 -49
  48. data/lib/rgeo/geographic/proj4_projector.rb +0 -2
  49. data/lib/rgeo/geographic/projected_feature_classes.rb +21 -9
  50. data/lib/rgeo/geographic/projected_feature_methods.rb +67 -28
  51. data/lib/rgeo/geographic/simple_mercator_projector.rb +0 -2
  52. data/lib/rgeo/geographic/spherical_feature_classes.rb +29 -9
  53. data/lib/rgeo/geographic/spherical_feature_methods.rb +79 -2
  54. data/lib/rgeo/geos/capi_factory.rb +21 -38
  55. data/lib/rgeo/geos/capi_feature_classes.rb +54 -11
  56. data/lib/rgeo/geos/ffi_factory.rb +6 -35
  57. data/lib/rgeo/geos/ffi_feature_classes.rb +34 -10
  58. data/lib/rgeo/geos/ffi_feature_methods.rb +39 -5
  59. data/lib/rgeo/geos/interface.rb +0 -24
  60. data/lib/rgeo/geos/zm_factory.rb +0 -19
  61. data/lib/rgeo/geos/zm_feature_methods.rb +16 -0
  62. data/lib/rgeo/geos.rb +6 -3
  63. data/lib/rgeo/impl_helper/basic_geometry_collection_methods.rb +4 -4
  64. data/lib/rgeo/impl_helper/basic_geometry_methods.rb +1 -1
  65. data/lib/rgeo/impl_helper/basic_line_string_methods.rb +15 -19
  66. data/lib/rgeo/impl_helper/basic_point_methods.rb +1 -1
  67. data/lib/rgeo/impl_helper/basic_polygon_methods.rb +1 -1
  68. data/lib/rgeo/impl_helper/valid_op.rb +354 -0
  69. data/lib/rgeo/impl_helper/validity_check.rb +139 -0
  70. data/lib/rgeo/impl_helper.rb +1 -0
  71. data/lib/rgeo/version.rb +1 -1
  72. metadata +45 -9
  73. data/lib/rgeo/coord_sys/srs_database/entry.rb +0 -107
  74. data/lib/rgeo/coord_sys/srs_database/sr_org.rb +0 -64
  75. data/lib/rgeo/coord_sys/srs_database/url_reader.rb +0 -65
@@ -69,41 +69,78 @@ module RGeo
69
69
  end
70
70
 
71
71
  def intersects_segment?(seg)
72
+ !segment_intersection(seg).nil?
73
+ end
74
+
75
+ # If this and the other segment intersect, this method will return the coordinate
76
+ # at which they intersect, otherwise nil.
77
+ # In the case of a partial overlap (parallel segments), this will return
78
+ # a single point on the overlapping portion.
79
+ #
80
+ # @param seg [Segment]
81
+ #
82
+ # @return [RGeo::Feature::Point, nil]
83
+ def segment_intersection(seg)
72
84
  s2 = seg.s
73
85
  # Handle degenerate cases
74
86
  if seg.degenerate?
75
- if @lensq == 0
76
- return @s == s2
87
+ if @lensq == 0 && @s == s2
88
+ return @s
77
89
  else
78
- return contains_point?(s2)
90
+ return contains_point?(s2) ? s2 : nil
79
91
  end
80
92
  elsif @lensq == 0
81
- return seg.contains_point?(@s)
93
+ return seg.contains_point?(@s) ? @s : nil
82
94
  end
95
+
83
96
  # Both segments have nonzero length.
84
97
  sx2 = s2.x
85
98
  sy2 = s2.y
86
99
  dx2 = seg.dx
87
100
  dy2 = seg.dy
88
101
  denom = @dx * dy2 - @dy * dx2
102
+
89
103
  if denom == 0
90
104
  # Segments are parallel. Make sure they are collinear.
91
- return false unless side(s2) == 0
92
- # 1-D check.
93
- ts = (@dx * (sx2 - @sx) + @dy * (sy2 - @sy)) / @lensq
94
- te = (@dx * (sx2 + dx2 - @sx) + @dy * (sy2 + dy2 - @sy)) / @lensq
95
- if ts < te
96
- te >= 0.0 && ts <= 1.0
97
- else
98
- ts >= 0.0 && te <= 1.0
99
- end
105
+ return nil unless side(s2) == 0
106
+
107
+ # return the first point it finds that intersects another line.
108
+ # In many cases, the intersection is actually another line
109
+ # segment, but for now, we will just return a single point.
110
+ return s2 if contains_point?(s2)
111
+ return seg.e if contains_point?(seg.e)
112
+ return @s if seg.contains_point?(@s)
113
+ return @e if seg.contains_point?(@e)
114
+ nil
100
115
  else
101
116
  # Segments are not parallel. Check the intersection of their
102
117
  # containing lines.
103
- t = (dy2 * (sx2 - @sx) + dx2 * (@sy - sy2)) / denom
104
- return false if t < 0.0 || t > 1.0
105
- t2 = (@dy * (sx2 - @sx) + @dx * (@sy - sy2)) / denom
106
- t2 >= 0.0 && t2 <= 1.0
118
+ num1 = dx2 * (@sy - sy2) - (dy2 * (@sx - sx2))
119
+ num2 = @dx * (@sy - sy2) - (@dy * (@sx - sx2))
120
+ cross1 = num1 / denom
121
+ cross2 = num2 / denom
122
+
123
+ return nil if cross1 < 0.0 || cross1 > 1.0
124
+ if cross2 >= 0.0 && cross2 <= 1.0
125
+ x = @sx + (cross1 * @dx)
126
+ y = @sy + (cross1 * @dy)
127
+
128
+ # Check if this segment contains the point.
129
+ # Sometimes round-off errors occur and intersections
130
+ # are recorded as off the line segments.
131
+ #
132
+ # If this is the case, return the closest point from
133
+ # either segment.
134
+ int_pt = @s.factory.point(x, y)
135
+ if contains_point?(int_pt)
136
+ int_pt
137
+ else
138
+ # find closest of @s, @e, seg.s, seg.e
139
+ [@e, seg.s, seg.e].reduce(@s) do |closest, pt|
140
+ int_pt.distance(pt) < int_pt.distance(closest) ? pt : closest
141
+ end
142
+ end
143
+ end
107
144
  end
108
145
  end
109
146
 
@@ -22,6 +22,11 @@ module RGeo
22
22
  def initialize(opts = {})
23
23
  @has_z = opts[:has_z_coordinate] ? true : false
24
24
  @has_m = opts[:has_m_coordinate] ? true : false
25
+ @coordinate_dimension = 2
26
+ @coordinate_dimension += 1 if @has_z
27
+ @coordinate_dimension += 1 if @has_m
28
+ @spatial_dimension = @has_z ? 3 : 2
29
+
25
30
  @proj4 = opts[:proj4]
26
31
  if @proj4 && CoordSys.check!(:proj4)
27
32
  if @proj4.is_a?(String) || @proj4.is_a?(Hash)
@@ -33,16 +38,8 @@ module RGeo
33
38
  if @coord_sys.is_a?(String)
34
39
  @coord_sys = CoordSys::CS.create_from_wkt(@coord_sys)
35
40
  end
36
- if (!@proj4 || !@coord_sys) && srid && (db = opts[:srs_database])
37
- entry = db.get(srid.to_i)
38
- if entry
39
- @proj4 ||= entry.proj4
40
- @coord_sys ||= entry.coord_sys
41
- end
42
- end
43
41
  srid ||= @coord_sys.authority_code if @coord_sys
44
42
  @srid = srid.to_i
45
- @lenient_assertions = opts[:uses_lenient_assertions] ? true : false
46
43
  @buffer_resolution = opts[:buffer_resolution].to_i
47
44
  @buffer_resolution = 1 if @buffer_resolution < 1
48
45
 
@@ -75,6 +72,7 @@ module RGeo
75
72
  @wkb_parser = WKRep::WKBParser.new(self)
76
73
  end
77
74
  end
75
+ attr_reader :coordinate_dimension, :spatial_dimension
78
76
 
79
77
  # Equivalence test.
80
78
 
@@ -103,7 +101,6 @@ module RGeo
103
101
  "wkbg" => @wkb_generator.properties,
104
102
  "wktp" => @wkt_parser.properties,
105
103
  "wkbp" => @wkb_parser.properties,
106
- "lena" => @lenient_assertions,
107
104
  "bufr" => @buffer_resolution
108
105
  }
109
106
  hash_["proj4"] = @proj4.marshal_dump if @proj4
@@ -131,7 +128,6 @@ module RGeo
131
128
  wkb_generator: symbolize_hash(data["wkbg"]),
132
129
  wkt_parser: symbolize_hash(data["wktp"]),
133
130
  wkb_parser: symbolize_hash(data["wkbp"]),
134
- uses_lenient_assertions: data["lena"],
135
131
  buffer_resolution: data["bufr"],
136
132
  proj4: proj4,
137
133
  coord_sys: coord_sys
@@ -144,7 +140,6 @@ module RGeo
144
140
  coder["has_z_coordinate"] = @has_z
145
141
  coder["has_m_coordinate"] = @has_m
146
142
  coder["srid"] = @srid
147
- coder["lenient_assertions"] = @lenient_assertions
148
143
  coder["buffer_resolution"] = @buffer_resolution
149
144
  coder["wkt_generator"] = @wkt_generator.properties
150
145
  coder["wkb_generator"] = @wkb_generator.properties
@@ -180,7 +175,6 @@ module RGeo
180
175
  wkb_generator: symbolize_hash(coder["wkb_generator"]),
181
176
  wkt_parser: symbolize_hash(coder["wkt_parser"]),
182
177
  wkb_parser: symbolize_hash(coder["wkb_parser"]),
183
- uses_lenient_assertions: coder["lenient_assertions"],
184
178
  buffer_resolution: coder["buffer_resolution"],
185
179
  proj4: proj4,
186
180
  coord_sys: coord_sys
@@ -199,8 +193,6 @@ module RGeo
199
193
  @has_z
200
194
  when :has_m_coordinate
201
195
  @has_m
202
- when :uses_lenient_assertions
203
- @lenient_assertions
204
196
  when :buffer_resolution
205
197
  @buffer_resolution
206
198
  when :is_cartesian
@@ -6,79 +6,101 @@
6
6
  #
7
7
  # -----------------------------------------------------------------------------
8
8
 
9
+ require_relative "../impl_helper/validity_check"
10
+
9
11
  module RGeo
10
12
  module Cartesian
11
13
  class PointImpl # :nodoc:
12
- include RGeo::Feature::Point
13
- include RGeo::ImplHelper::BasicGeometryMethods
14
- include RGeo::ImplHelper::BasicPointMethods
15
- include RGeo::Cartesian::GeometryMethods
16
- include RGeo::Cartesian::PointMethods
14
+ include Feature::Point
15
+ include ImplHelper::ValidityCheck
16
+ include ImplHelper::BasicGeometryMethods
17
+ include ImplHelper::BasicPointMethods
18
+ include ImplHelper::ValidOp
19
+ include GeometryMethods
20
+ include PointMethods
17
21
  end
18
22
 
19
23
  class LineStringImpl # :nodoc:
20
- include RGeo::Feature::LineString
21
- include RGeo::ImplHelper::BasicGeometryMethods
22
- include RGeo::ImplHelper::BasicLineStringMethods
23
- include RGeo::Cartesian::GeometryMethods
24
- include RGeo::Cartesian::LineStringMethods
24
+ include Feature::LineString
25
+ include ImplHelper::ValidityCheck
26
+ include ImplHelper::BasicGeometryMethods
27
+ include ImplHelper::BasicLineStringMethods
28
+ include ImplHelper::ValidOp
29
+ include GeometryMethods
30
+ include LineStringMethods
25
31
  end
26
32
 
27
33
  class LineImpl # :nodoc:
28
- include RGeo::Feature::Line
29
- include RGeo::ImplHelper::BasicGeometryMethods
30
- include RGeo::ImplHelper::BasicLineStringMethods
31
- include RGeo::ImplHelper::BasicLineMethods
32
- include RGeo::Cartesian::GeometryMethods
33
- include RGeo::Cartesian::LineStringMethods
34
+ include Feature::Line
35
+ include ImplHelper::ValidityCheck
36
+ include ImplHelper::BasicGeometryMethods
37
+ include ImplHelper::BasicLineStringMethods
38
+ include ImplHelper::BasicLineMethods
39
+ include ImplHelper::ValidOp
40
+ include GeometryMethods
41
+ include LineStringMethods
34
42
  end
35
43
 
36
44
  class LinearRingImpl # :nodoc:
37
- include RGeo::Feature::LinearRing
38
- include RGeo::ImplHelper::BasicGeometryMethods
39
- include RGeo::ImplHelper::BasicLineStringMethods
40
- include RGeo::ImplHelper::BasicLinearRingMethods
41
- include RGeo::Cartesian::GeometryMethods
42
- include RGeo::Cartesian::LineStringMethods
45
+ include Feature::LinearRing
46
+ include ImplHelper::ValidityCheck
47
+ include ImplHelper::BasicGeometryMethods
48
+ include ImplHelper::BasicLineStringMethods
49
+ include ImplHelper::BasicLinearRingMethods
50
+ include ImplHelper::ValidOp
51
+ include GeometryMethods
52
+ include LineStringMethods
43
53
  end
44
54
 
45
55
  class PolygonImpl # :nodoc:
46
- include RGeo::Feature::Polygon
47
- include RGeo::ImplHelper::BasicGeometryMethods
48
- include RGeo::ImplHelper::BasicPolygonMethods
49
- include RGeo::Cartesian::GeometryMethods
56
+ include Feature::Polygon
57
+ include ImplHelper::ValidityCheck
58
+ include ImplHelper::BasicGeometryMethods
59
+ include ImplHelper::BasicPolygonMethods
60
+ include ValidOp
61
+ include GeometryMethods
50
62
  end
51
63
 
52
64
  class GeometryCollectionImpl # :nodoc:
53
- include RGeo::Feature::GeometryCollection
54
- include RGeo::ImplHelper::BasicGeometryMethods
55
- include RGeo::ImplHelper::BasicGeometryCollectionMethods
56
- include RGeo::Cartesian::GeometryMethods
65
+ include Feature::GeometryCollection
66
+ include ImplHelper::ValidityCheck
67
+ include ImplHelper::BasicGeometryMethods
68
+ include ImplHelper::BasicGeometryCollectionMethods
69
+ include ImplHelper::ValidOp
70
+ include GeometryMethods
57
71
  end
58
72
 
59
73
  class MultiPointImpl # :nodoc:
60
- include RGeo::Feature::MultiPoint
61
- include RGeo::ImplHelper::BasicGeometryMethods
62
- include RGeo::ImplHelper::BasicGeometryCollectionMethods
63
- include RGeo::ImplHelper::BasicMultiPointMethods
64
- include RGeo::Cartesian::GeometryMethods
74
+ include Feature::MultiPoint
75
+ include ImplHelper::ValidityCheck
76
+ include ImplHelper::BasicGeometryMethods
77
+ include ImplHelper::BasicGeometryCollectionMethods
78
+ include ImplHelper::BasicMultiPointMethods
79
+ include ImplHelper::ValidOp
80
+ include GeometryMethods
65
81
  end
66
82
 
67
83
  class MultiLineStringImpl # :nodoc:
68
- include RGeo::Feature::MultiLineString
69
- include RGeo::ImplHelper::BasicGeometryMethods
70
- include RGeo::ImplHelper::BasicGeometryCollectionMethods
71
- include RGeo::ImplHelper::BasicMultiLineStringMethods
72
- include RGeo::Cartesian::GeometryMethods
73
- include RGeo::Cartesian::MultiLineStringMethods
84
+ include Feature::MultiLineString
85
+ include ImplHelper::ValidityCheck
86
+ include ImplHelper::BasicGeometryMethods
87
+ include ImplHelper::BasicGeometryCollectionMethods
88
+ include ImplHelper::BasicMultiLineStringMethods
89
+ include ImplHelper::ValidOp
90
+ include GeometryMethods
91
+ include MultiLineStringMethods
74
92
  end
75
93
 
76
94
  class MultiPolygonImpl # :nodoc:
77
- include RGeo::Feature::MultiPolygon
78
- include RGeo::ImplHelper::BasicGeometryMethods
79
- include RGeo::ImplHelper::BasicGeometryCollectionMethods
80
- include RGeo::ImplHelper::BasicMultiPolygonMethods
81
- include RGeo::Cartesian::GeometryMethods
95
+ include Feature::MultiPolygon
96
+ include ImplHelper::ValidityCheck
97
+ include ImplHelper::BasicGeometryMethods
98
+ include ImplHelper::BasicGeometryCollectionMethods
99
+ include ImplHelper::BasicMultiPolygonMethods
100
+ include ImplHelper::ValidOp
101
+ include GeometryMethods
82
102
  end
103
+
104
+ ImplHelper::ValidityCheck.override_classes
83
105
  end
84
106
  end
@@ -16,6 +16,28 @@ module RGeo
16
16
  def envelope
17
17
  BoundingBox.new(factory).add(self).to_geometry
18
18
  end
19
+
20
+ def coordinate_dimension
21
+ factory.coordinate_dimension
22
+ end
23
+
24
+ def spatial_dimension
25
+ factory.spatial_dimension
26
+ end
27
+
28
+ def is_3d?
29
+ factory.property(:has_z_coordinate)
30
+ end
31
+
32
+ def measured?
33
+ factory.property(:has_m_coordinate)
34
+ end
35
+
36
+ private
37
+
38
+ def graph
39
+ @graph ||= GeometryGraph.new(self)
40
+ end
19
41
  end
20
42
 
21
43
  module PointMethods # :nodoc:
@@ -50,26 +72,14 @@ module RGeo
50
72
  end
51
73
 
52
74
  def simple?
53
- len = segments.length
54
- return false if segments.any?(&:degenerate?)
55
- return true if len == 1
56
- return segments[0].s != segments[1].e if len == 2
57
- segments.each_with_index do |seg, index|
58
- nindex = index + 1
59
- nindex = nil if nindex == len
60
- return false if nindex && seg.contains_point?(segments[nindex].e)
61
- pindex = index - 1
62
- pindex = nil if pindex < 0
63
- return false if pindex && seg.contains_point?(segments[pindex].s)
64
- next unless nindex
65
- oindex = nindex + 1
66
- while oindex < len
67
- oseg = segments[oindex]
68
- return false if !(index == 0 && oindex == len - 1 && seg.s == oseg.e) && seg.intersects_segment?(oseg)
69
- oindex += 1
70
- end
71
- end
72
- true
75
+ # Use a SweeplineIntersector to determine if there are any self-intersections
76
+ # in the ring. The GeometryGraph of the ring could be used by comparing the
77
+ # edges to number of segments (graph.incident_edges.length == segments.length),
78
+ # but this adds computational and memory overhead if graph isn't already memoized.
79
+ # Since graph is not used elsewhere in LineStringMethods, we will just use the
80
+ # SweeplineIntersector for now.
81
+ li = SweeplineIntersector.new(segments)
82
+ li.proper_intersections.empty?
73
83
  end
74
84
 
75
85
  def is_simple?
@@ -80,6 +90,43 @@ module RGeo
80
90
  def length
81
91
  segments.inject(0.0) { |sum, seg| sum + seg.length }
82
92
  end
93
+
94
+ def crosses?(rhs)
95
+ case rhs
96
+ when Feature::LineString
97
+ crosses_line_string?(rhs)
98
+ else
99
+ super
100
+ end
101
+ end
102
+
103
+ private
104
+
105
+ # Determines if a cross occurs with another linestring.
106
+ # Process is to get the number of proper intersections in each geom
107
+ # then overlay and get the number of proper intersections from that.
108
+ # If the overlaid number is higher than the sum of individual self-ints
109
+ # then there is an intersection. Finally, we need to check the intersection
110
+ # to see that it is not a boundary point of either segment.
111
+ #
112
+ # @param rhs [Feature::LineString]
113
+ #
114
+ # @return [Boolean]
115
+ def crosses_line_string?(rhs)
116
+ self_ints = SweeplineIntersector.new(segments).proper_intersections
117
+ self_ints += SweeplineIntersector.new(rhs.segments).proper_intersections
118
+ overlay_ints = SweeplineIntersector.new(segments + rhs.segments).proper_intersections
119
+
120
+ (overlay_ints - self_ints).each do |int|
121
+ s1s = int.s1.s
122
+ s1e = int.s1.e
123
+ s2s = int.s2.s
124
+ s2e = int.s2.e
125
+ return true unless [s1s, s1e, s2s, s2e].include?(int.point)
126
+ end
127
+
128
+ false
129
+ end
83
130
  end
84
131
 
85
132
  module MultiLineStringMethods # :nodoc:
@@ -69,21 +69,10 @@ module RGeo
69
69
  # The coordinate system in OGC form, either as a subclass of
70
70
  # CoordSys::CS::CoordinateSystem, or as a string in WKT format.
71
71
  # Optional.
72
- # [<tt>:srs_database</tt>]
73
- # Optional. If provided, the value should be an implementation of
74
- # CoordSys::SRSDatabase::Interface. If both this and an SRID are
75
- # provided, they are used to look up the proj4 and coord_sys
76
- # objects from a spatial reference system database.
77
72
  # [<tt>:has_z_coordinate</tt>]
78
73
  # Support a Z coordinate. Default is false.
79
74
  # [<tt>:has_m_coordinate</tt>]
80
75
  # Support an M coordinate. Default is false.
81
- # [<tt>:uses_lenient_assertions</tt>]
82
- # If set to true, assertion checking is disabled. This includes
83
- # simplicity checking on LinearRing, and validity checks on
84
- # Polygon and MultiPolygon. This may speed up creation of certain
85
- # objects, at the expense of not doing the proper checking for
86
- # OGC compliance. Default is false.
87
76
  # [<tt>:wkt_parser</tt>]
88
77
  # Configure the parser for WKT. The value is a hash of
89
78
  # configuration parameters for WKRep::WKTParser.new. Default is
@@ -107,31 +96,6 @@ module RGeo
107
96
  def simple_factory(opts = {})
108
97
  Cartesian::Factory.new(opts)
109
98
  end
110
-
111
- # Returns a Feature::FactoryGenerator that creates preferred
112
- # factories. The given options are used as the default options.
113
- #
114
- # A common case for this is to provide the <tt>:srs_database</tt>
115
- # as a default. Then, the factory generator need only be passed
116
- # an SRID and it will automatically fetch the appropriate Proj4
117
- # and CoordSys objects.
118
-
119
- def preferred_factory_generator(defaults = {})
120
- proc { |c| preferred_factory(defaults.merge(c)) }
121
- end
122
- alias factory_generator preferred_factory_generator
123
-
124
- # Returns a Feature::FactoryGenerator that creates simple factories.
125
- # The given options are used as the default options.
126
- #
127
- # A common case for this is to provide the <tt>:srs_database</tt>
128
- # as a default. Then, the factory generator need only be passed
129
- # an SRID and it will automatically fetch the appropriate Proj4
130
- # and CoordSys objects.
131
-
132
- def simple_factory_generator(defaults = {})
133
- proc { |c| simple_factory(defaults.merge(c)) }
134
- end
135
99
  end
136
100
  end
137
101
  end