rgeo 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/History.rdoc +6 -0
  2. data/README.rdoc +1 -1
  3. data/Version +1 -1
  4. data/ext/geos_c_impl/extconf.rb +13 -13
  5. data/ext/geos_c_impl/factory.c +30 -18
  6. data/ext/geos_c_impl/factory.h +18 -12
  7. data/ext/geos_c_impl/geometry.c +11 -11
  8. data/ext/geos_c_impl/geometry.h +7 -7
  9. data/ext/geos_c_impl/geometry_collection.c +15 -15
  10. data/ext/geos_c_impl/geometry_collection.h +8 -8
  11. data/ext/geos_c_impl/line_string.c +14 -14
  12. data/ext/geos_c_impl/line_string.h +7 -7
  13. data/ext/geos_c_impl/main.c +7 -7
  14. data/ext/geos_c_impl/point.c +9 -9
  15. data/ext/geos_c_impl/point.h +7 -7
  16. data/ext/geos_c_impl/polygon.c +9 -9
  17. data/ext/geos_c_impl/polygon.h +7 -7
  18. data/ext/geos_c_impl/preface.h +7 -7
  19. data/ext/proj4_c_impl/extconf.rb +13 -13
  20. data/ext/proj4_c_impl/main.c +12 -12
  21. data/lib/rgeo.rb +26 -26
  22. data/lib/rgeo/cartesian.rb +12 -12
  23. data/lib/rgeo/cartesian/analysis.rb +26 -26
  24. data/lib/rgeo/cartesian/bounding_box.rb +83 -83
  25. data/lib/rgeo/cartesian/calculations.rb +36 -36
  26. data/lib/rgeo/cartesian/factory.rb +78 -78
  27. data/lib/rgeo/cartesian/feature_classes.rb +74 -74
  28. data/lib/rgeo/cartesian/feature_methods.rb +34 -34
  29. data/lib/rgeo/cartesian/interface.rb +33 -33
  30. data/lib/rgeo/coord_sys.rb +15 -15
  31. data/lib/rgeo/coord_sys/cs/entities.rb +533 -534
  32. data/lib/rgeo/coord_sys/cs/factories.rb +69 -69
  33. data/lib/rgeo/coord_sys/cs/wkt_parser.rb +44 -44
  34. data/lib/rgeo/coord_sys/proj4.rb +85 -85
  35. data/lib/rgeo/coord_sys/srs_database/active_record_table.rb +31 -31
  36. data/lib/rgeo/coord_sys/srs_database/interface.rb +44 -44
  37. data/lib/rgeo/coord_sys/srs_database/proj4_data.rb +31 -31
  38. data/lib/rgeo/coord_sys/srs_database/sr_org.rb +31 -31
  39. data/lib/rgeo/coord_sys/srs_database/url_reader.rb +29 -29
  40. data/lib/rgeo/error.rb +17 -17
  41. data/lib/rgeo/feature.rb +15 -15
  42. data/lib/rgeo/feature/curve.rb +58 -58
  43. data/lib/rgeo/feature/factory.rb +84 -84
  44. data/lib/rgeo/feature/factory_generator.rb +32 -32
  45. data/lib/rgeo/feature/geometry.rb +215 -215
  46. data/lib/rgeo/feature/geometry_collection.rb +46 -46
  47. data/lib/rgeo/feature/line.rb +21 -21
  48. data/lib/rgeo/feature/line_string.rb +35 -35
  49. data/lib/rgeo/feature/linear_ring.rb +20 -20
  50. data/lib/rgeo/feature/mixins.rb +61 -61
  51. data/lib/rgeo/feature/multi_curve.rb +37 -37
  52. data/lib/rgeo/feature/multi_line_string.rb +20 -20
  53. data/lib/rgeo/feature/multi_point.rb +22 -22
  54. data/lib/rgeo/feature/multi_polygon.rb +28 -28
  55. data/lib/rgeo/feature/multi_surface.rb +39 -39
  56. data/lib/rgeo/feature/point.rb +42 -42
  57. data/lib/rgeo/feature/polygon.rb +50 -50
  58. data/lib/rgeo/feature/surface.rb +42 -42
  59. data/lib/rgeo/feature/types.rb +58 -58
  60. data/lib/rgeo/geographic.rb +14 -14
  61. data/lib/rgeo/geographic/factory.rb +87 -87
  62. data/lib/rgeo/geographic/interface.rb +55 -55
  63. data/lib/rgeo/geographic/proj4_projector.rb +35 -35
  64. data/lib/rgeo/geographic/projected_feature_classes.rb +95 -95
  65. data/lib/rgeo/geographic/projected_feature_methods.rb +81 -81
  66. data/lib/rgeo/geographic/projected_window.rb +103 -103
  67. data/lib/rgeo/geographic/simple_mercator_projector.rb +32 -32
  68. data/lib/rgeo/geographic/spherical_feature_classes.rb +93 -93
  69. data/lib/rgeo/geographic/spherical_feature_methods.rb +25 -25
  70. data/lib/rgeo/geographic/spherical_math.rb +58 -58
  71. data/lib/rgeo/geos.rb +22 -17
  72. data/lib/rgeo/geos/factory.rb +93 -93
  73. data/lib/rgeo/geos/ffi_classes.rb +306 -231
  74. data/lib/rgeo/geos/ffi_factory.rb +100 -96
  75. data/lib/rgeo/geos/impl_additions.rb +22 -22
  76. data/lib/rgeo/geos/interface.rb +45 -45
  77. data/lib/rgeo/geos/zm_factory.rb +90 -90
  78. data/lib/rgeo/geos/zm_impl.rb +167 -167
  79. data/lib/rgeo/impl_helper.rb +11 -11
  80. data/lib/rgeo/impl_helper/basic_geometry_collection_methods.rb +71 -71
  81. data/lib/rgeo/impl_helper/basic_geometry_methods.rb +29 -29
  82. data/lib/rgeo/impl_helper/basic_line_string_methods.rb +61 -61
  83. data/lib/rgeo/impl_helper/basic_point_methods.rb +43 -43
  84. data/lib/rgeo/impl_helper/basic_polygon_methods.rb +35 -35
  85. data/lib/rgeo/impl_helper/math.rb +13 -13
  86. data/lib/rgeo/version.rb +10 -10
  87. data/lib/rgeo/wkrep.rb +16 -16
  88. data/lib/rgeo/wkrep/wkb_generator.rb +51 -51
  89. data/lib/rgeo/wkrep/wkb_parser.rb +52 -52
  90. data/lib/rgeo/wkrep/wkt_generator.rb +51 -51
  91. data/lib/rgeo/wkrep/wkt_parser.rb +66 -66
  92. data/lib/rgeo/yaml.rb +14 -14
  93. data/test/common/geometry_collection_tests.rb +53 -53
  94. data/test/common/line_string_tests.rb +57 -57
  95. data/test/common/multi_line_string_tests.rb +43 -43
  96. data/test/common/multi_point_tests.rb +43 -43
  97. data/test/common/multi_polygon_tests.rb +43 -43
  98. data/test/common/point_tests.rb +75 -75
  99. data/test/common/polygon_tests.rb +37 -37
  100. data/test/coord_sys/tc_active_record_table.rb +25 -25
  101. data/test/coord_sys/tc_ogc_cs.rb +72 -72
  102. data/test/coord_sys/tc_proj4.rb +51 -51
  103. data/test/coord_sys/tc_proj4_srs_data.rb +17 -17
  104. data/test/coord_sys/tc_sr_org.rb +15 -15
  105. data/test/coord_sys/tc_url_reader.rb +19 -19
  106. data/test/geos_capi/tc_factory.rb +21 -21
  107. data/test/geos_capi/tc_geometry_collection.rb +15 -15
  108. data/test/geos_capi/tc_line_string.rb +15 -15
  109. data/test/geos_capi/tc_misc.rb +33 -22
  110. data/test/geos_capi/tc_multi_line_string.rb +15 -15
  111. data/test/geos_capi/tc_multi_point.rb +15 -15
  112. data/test/geos_capi/tc_multi_polygon.rb +15 -15
  113. data/test/geos_capi/tc_parsing_unparsing.rb +19 -19
  114. data/test/geos_capi/tc_point.rb +21 -21
  115. data/test/geos_capi/tc_polygon.rb +19 -19
  116. data/test/geos_capi/tc_zmfactory.rb +17 -17
  117. data/test/geos_ffi/tc_factory.rb +21 -21
  118. data/test/geos_ffi/tc_geometry_collection.rb +15 -15
  119. data/test/geos_ffi/tc_line_string.rb +15 -15
  120. data/test/geos_ffi/tc_misc.rb +49 -15
  121. data/test/geos_ffi/tc_multi_line_string.rb +15 -15
  122. data/test/geos_ffi/tc_multi_point.rb +15 -15
  123. data/test/geos_ffi/tc_multi_polygon.rb +15 -15
  124. data/test/geos_ffi/tc_parsing_unparsing.rb +19 -19
  125. data/test/geos_ffi/tc_point.rb +21 -21
  126. data/test/geos_ffi/tc_polygon.rb +19 -19
  127. data/test/geos_ffi/tc_zmfactory.rb +17 -17
  128. data/test/projected_geographic/tc_geometry_collection.rb +15 -15
  129. data/test/projected_geographic/tc_line_string.rb +15 -15
  130. data/test/projected_geographic/tc_multi_line_string.rb +15 -15
  131. data/test/projected_geographic/tc_multi_point.rb +15 -15
  132. data/test/projected_geographic/tc_multi_polygon.rb +15 -15
  133. data/test/projected_geographic/tc_point.rb +23 -23
  134. data/test/projected_geographic/tc_polygon.rb +15 -15
  135. data/test/simple_cartesian/tc_calculations.rb +31 -31
  136. data/test/simple_cartesian/tc_geometry_collection.rb +17 -17
  137. data/test/simple_cartesian/tc_line_string.rb +17 -17
  138. data/test/simple_cartesian/tc_multi_line_string.rb +17 -17
  139. data/test/simple_cartesian/tc_multi_point.rb +17 -17
  140. data/test/simple_cartesian/tc_multi_polygon.rb +17 -17
  141. data/test/simple_cartesian/tc_point.rb +21 -21
  142. data/test/simple_cartesian/tc_polygon.rb +17 -17
  143. data/test/simple_mercator/tc_geometry_collection.rb +15 -15
  144. data/test/simple_mercator/tc_line_string.rb +15 -15
  145. data/test/simple_mercator/tc_multi_line_string.rb +15 -15
  146. data/test/simple_mercator/tc_multi_point.rb +15 -15
  147. data/test/simple_mercator/tc_multi_polygon.rb +15 -15
  148. data/test/simple_mercator/tc_point.rb +23 -23
  149. data/test/simple_mercator/tc_polygon.rb +15 -15
  150. data/test/simple_mercator/tc_window.rb +50 -50
  151. data/test/spherical_geographic/tc_calculations.rb +47 -47
  152. data/test/spherical_geographic/tc_geometry_collection.rb +17 -17
  153. data/test/spherical_geographic/tc_line_string.rb +17 -17
  154. data/test/spherical_geographic/tc_multi_line_string.rb +17 -17
  155. data/test/spherical_geographic/tc_multi_point.rb +17 -17
  156. data/test/spherical_geographic/tc_multi_polygon.rb +17 -17
  157. data/test/spherical_geographic/tc_point.rb +23 -23
  158. data/test/spherical_geographic/tc_polygon.rb +17 -17
  159. data/test/tc_cartesian_analysis.rb +23 -23
  160. data/test/tc_mixins.rb +39 -39
  161. data/test/tc_oneoff.rb +15 -15
  162. data/test/tc_types.rb +17 -17
  163. data/test/wkrep/tc_wkb_generator.rb +67 -67
  164. data/test/wkrep/tc_wkb_parser.rb +73 -73
  165. data/test/wkrep/tc_wkt_generator.rb +75 -75
  166. data/test/wkrep/tc_wkt_parser.rb +97 -97
  167. metadata +3 -3
@@ -1,15 +1,15 @@
1
1
  # -----------------------------------------------------------------------------
2
- #
2
+ #
3
3
  # GEOS toplevel interface
4
- #
4
+ #
5
5
  # -----------------------------------------------------------------------------
6
- # Copyright 2010 Daniel Azuma
7
- #
6
+ # Copyright 2010-2012 Daniel Azuma
7
+ #
8
8
  # All rights reserved.
9
- #
9
+ #
10
10
  # Redistribution and use in source and binary forms, with or without
11
11
  # modification, are permitted provided that the following conditions are met:
12
- #
12
+ #
13
13
  # * Redistributions of source code must retain the above copyright notice,
14
14
  # this list of conditions and the following disclaimer.
15
15
  # * Redistributions in binary form must reproduce the above copyright notice,
@@ -18,7 +18,7 @@
18
18
  # * Neither the name of the copyright holder, nor the names of any other
19
19
  # contributors to this software, may be used to endorse or promote products
20
20
  # derived from this software without specific prior written permission.
21
- #
21
+ #
22
22
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
23
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
24
  # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -35,89 +35,89 @@
35
35
 
36
36
 
37
37
  module RGeo
38
-
38
+
39
39
  module Geos
40
-
40
+
41
41
  class << self
42
-
43
-
42
+
43
+
44
44
  # Returns true if CAPI GEOS implementation is supported.
45
-
45
+
46
46
  def capi_supported?
47
47
  CAPI_SUPPORTED
48
48
  end
49
-
50
-
49
+
50
+
51
51
  # Returns true if FFI GEOS implementation is supported.
52
-
52
+
53
53
  def ffi_supported?
54
54
  FFI_SUPPORTED
55
55
  end
56
-
57
-
56
+
57
+
58
58
  # Returns true if any GEOS implementation is supported.
59
59
  # If this returns false, GEOS features are not available at all.
60
-
60
+
61
61
  def supported?
62
62
  FFI_SUPPORTED || CAPI_SUPPORTED
63
63
  end
64
-
65
-
64
+
65
+
66
66
  # Returns true if the given feature is a CAPI GEOS feature, or if
67
67
  # the given factory is a CAPI GEOS factory.
68
-
68
+
69
69
  def is_capi_geos?(object_)
70
70
  Factory === object_ || GeometryImpl === object_ ||
71
71
  ZMFactory === object_ && Factory === object_.z_factory ||
72
72
  ZMGeometryImpl === object_ && GeometryImpl === object_.z_geometry
73
73
  end
74
-
75
-
74
+
75
+
76
76
  # Returns true if the given feature is an FFI GEOS feature, or if
77
77
  # the given factory is an FFI GEOS factory.
78
-
78
+
79
79
  def is_ffi_geos?(object_)
80
80
  FFIFactory === object_ || FFIGeometryImpl === object_ ||
81
81
  ZMFactory === object_ && FFIFactory === object_.z_factory ||
82
82
  ZMGeometryImpl === object_ && FFIGeometryImpl === object_.z_geometry
83
83
  end
84
-
85
-
84
+
85
+
86
86
  # Returns true if the given feature is a GEOS feature, or if the given
87
87
  # factory is a GEOS factory. Does not distinguish between CAPI and FFI.
88
-
88
+
89
89
  def is_geos?(object_)
90
90
  Factory === object_ || GeometryImpl === object_ ||
91
91
  FFIFactory === object_ || FFIGeometryImpl === object_ ||
92
92
  ZMFactory === object_ || ZMGeometryImpl === object_
93
93
  end
94
-
95
-
94
+
95
+
96
96
  # The preferred native interface. This is the native interface
97
97
  # used by default when a factory is created.
98
98
  # Supported values are <tt>:capi</tt> and <tt>:ffi</tt>.
99
- #
99
+ #
100
100
  # This is set automatically when RGeo loads, to <tt>:capi</tt>
101
101
  # if the CAPI interface is available, otheriwse to <tt>:ffi</tt>
102
102
  # if FFI is available, otherwise to nil if no GEOS interface is
103
103
  # available. You can override this setting if you want to prefer
104
104
  # FFI over CAPI.
105
-
105
+
106
106
  attr_accessor :preferred_native_interface
107
-
108
-
107
+
108
+
109
109
  # Returns a factory for the GEOS implementation.
110
110
  # Returns nil if the GEOS implementation is not supported.
111
- #
111
+ #
112
112
  # Note that GEOS does not natively support 4-dimensional data
113
113
  # (i.e. both z and m values). However, RGeo's GEOS wrapper does
114
114
  # provide a 4-dimensional factory that utilizes an extra native
115
115
  # GEOS object to handle the extra coordinate. Hence, a factory
116
116
  # configured with both Z and M support will work, but will be
117
117
  # slower than a 2-dimensional or 3-dimensional factory.
118
- #
118
+ #
119
119
  # Options include:
120
- #
120
+ #
121
121
  # [<tt>:native_interface</tt>]
122
122
  # Specifies which native interface to use. Possible values are
123
123
  # <tt>:capi</tt> and <tt>:ffi</tt>. The default is the value
@@ -197,7 +197,7 @@ module RGeo
197
197
  # generate one explicitly using the <tt>prepare!</tt> method).
198
198
  # Currently, prepared geometries are supported under CAPI but
199
199
  # not FFI.
200
-
200
+
201
201
  def factory(opts_={})
202
202
  if supported?
203
203
  native_interface_ = opts_[:native_interface] || Geos.preferred_native_interface
@@ -212,23 +212,23 @@ module RGeo
212
212
  nil
213
213
  end
214
214
  end
215
-
216
-
215
+
216
+
217
217
  # Returns a Feature::FactoryGenerator that creates Geos-backed
218
218
  # factories. The given options are used as the default options.
219
- #
219
+ #
220
220
  # A common case for this is to provide the <tt>:srs_database</tt>
221
221
  # as a default. Then, the factory generator need only be passed
222
222
  # an SRID and it will automatically fetch the appropriate Proj4
223
223
  # and CoordSys objects.
224
-
224
+
225
225
  def factory_generator(defaults_={})
226
226
  ::Proc.new{ |c_| factory(defaults_.merge(c_)) }
227
227
  end
228
-
229
-
228
+
229
+
230
230
  end
231
-
231
+
232
232
  end
233
-
233
+
234
234
  end
@@ -1,15 +1,15 @@
1
1
  # -----------------------------------------------------------------------------
2
- #
2
+ #
3
3
  # GEOS zm factory implementation
4
- #
4
+ #
5
5
  # -----------------------------------------------------------------------------
6
- # Copyright 2010 Daniel Azuma
7
- #
6
+ # Copyright 2010-2012 Daniel Azuma
7
+ #
8
8
  # All rights reserved.
9
- #
9
+ #
10
10
  # Redistribution and use in source and binary forms, with or without
11
11
  # modification, are permitted provided that the following conditions are met:
12
- #
12
+ #
13
13
  # * Redistributions of source code must retain the above copyright notice,
14
14
  # this list of conditions and the following disclaimer.
15
15
  # * Redistributions in binary form must reproduce the above copyright notice,
@@ -18,7 +18,7 @@
18
18
  # * Neither the name of the copyright holder, nor the names of any other
19
19
  # contributors to this software, may be used to endorse or promote products
20
20
  # derived from this software without specific prior written permission.
21
- #
21
+ #
22
22
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
23
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
24
  # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -35,32 +35,32 @@
35
35
 
36
36
 
37
37
  module RGeo
38
-
38
+
39
39
  module Geos
40
-
41
-
40
+
41
+
42
42
  # A factory for Geos that handles both Z and M.
43
-
43
+
44
44
  class ZMFactory
45
-
45
+
46
46
  include Feature::Factory::Instance
47
-
48
-
47
+
48
+
49
49
  class << self
50
-
51
-
50
+
51
+
52
52
  # Create a new factory. Returns nil if the GEOS implementation is
53
53
  # not supported.
54
-
54
+
55
55
  def create(opts_={})
56
56
  return nil unless Geos.supported?
57
57
  new(opts_)
58
58
  end
59
-
60
-
59
+
60
+
61
61
  end
62
-
63
-
62
+
63
+
64
64
  def initialize(opts_={}) # :nodoc:
65
65
  proj4_ = opts_[:proj4]
66
66
  coord_sys_ = opts_[:coord_sys]
@@ -88,7 +88,7 @@ module RGeo
88
88
  @zfactory = Factory.create(config_.merge(:has_z_coordinate => true))
89
89
  @mfactory = Factory.create(config_.merge(:has_m_coordinate => true))
90
90
  end
91
-
91
+
92
92
  wkt_generator_ = opts_[:wkt_generator]
93
93
  case wkt_generator_
94
94
  when ::Hash
@@ -118,54 +118,54 @@ module RGeo
118
118
  @wkb_parser = WKRep::WKBParser.new(self)
119
119
  end
120
120
  end
121
-
122
-
121
+
122
+
123
123
  # Returns the SRID of geometries created by this factory.
124
-
124
+
125
125
  def srid
126
126
  @zfactory.srid
127
127
  end
128
-
129
-
128
+
129
+
130
130
  # Returns the resolution used by buffer calculations on geometries
131
131
  # created by this factory
132
-
132
+
133
133
  def buffer_resolution
134
134
  @zfactory.buffer_resolution
135
135
  end
136
-
137
-
136
+
137
+
138
138
  # Returns true if this factory is lenient with MultiPolygon assertions
139
-
139
+
140
140
  def lenient_multi_polygon_assertions?
141
141
  @zfactory.lenient_multi_polygon_assertions?
142
142
  end
143
-
144
-
143
+
144
+
145
145
  # Returns the z-only factory corresponding to this factory.
146
-
146
+
147
147
  def z_factory
148
148
  @zfactory
149
149
  end
150
-
151
-
150
+
151
+
152
152
  # Returns the m-only factory corresponding to this factory.
153
-
153
+
154
154
  def m_factory
155
155
  @mfactory
156
156
  end
157
-
158
-
157
+
158
+
159
159
  # Factory equivalence test.
160
-
160
+
161
161
  def eql?(rhs_)
162
162
  rhs_.is_a?(ZMFactory) && rhs_.z_factory == @zfactory
163
163
  end
164
164
  alias_method :==, :eql?
165
-
166
-
165
+
166
+
167
167
  # See ::RGeo::Feature::Factory#property
168
-
168
+
169
169
  def property(name_)
170
170
  case name_
171
171
  when :has_z_coordinate, :has_m_coordinate, :is_cartesian
@@ -174,101 +174,101 @@ module RGeo
174
174
  nil
175
175
  end
176
176
  end
177
-
178
-
177
+
178
+
179
179
  # See ::RGeo::Feature::Factory#parse_wkt
180
-
180
+
181
181
  def parse_wkt(str_)
182
182
  @wkt_parser.parse(str_)
183
183
  end
184
-
185
-
184
+
185
+
186
186
  # See ::RGeo::Feature::Factory#parse_wkb
187
-
187
+
188
188
  def parse_wkb(str_)
189
189
  @wkb_parser.parse(str_)
190
190
  end
191
-
192
-
191
+
192
+
193
193
  # See ::RGeo::Feature::Factory#point
194
-
194
+
195
195
  def point(x_, y_, z_=0, m_=0)
196
196
  ZMPointImpl.create(self, @zfactory.point(x_, y_, z_), @mfactory.point(x_, y_, m_))
197
197
  end
198
-
199
-
198
+
199
+
200
200
  # See ::RGeo::Feature::Factory#line_string
201
-
201
+
202
202
  def line_string(points_)
203
203
  ZMLineStringImpl.create(self, @zfactory.line_string(points_), @mfactory.line_string(points_))
204
204
  end
205
-
206
-
205
+
206
+
207
207
  # See ::RGeo::Feature::Factory#line
208
-
208
+
209
209
  def line(start_, end_)
210
210
  ZMLineStringImpl.create(self, @zfactory.line(start_, end_), @mfactory.line(start_, end_))
211
211
  end
212
-
213
-
212
+
213
+
214
214
  # See ::RGeo::Feature::Factory#linear_ring
215
-
215
+
216
216
  def linear_ring(points_)
217
217
  ZMLineStringImpl.create(self, @zfactory.linear_ring(points_), @mfactory.linear_ring(points_))
218
218
  end
219
-
220
-
219
+
220
+
221
221
  # See ::RGeo::Feature::Factory#polygon
222
-
222
+
223
223
  def polygon(outer_ring_, inner_rings_=nil)
224
224
  ZMPolygonImpl.create(self, @zfactory.polygon(outer_ring_, inner_rings_), @mfactory.polygon(outer_ring_, inner_rings_))
225
225
  end
226
-
227
-
226
+
227
+
228
228
  # See ::RGeo::Feature::Factory#collection
229
-
229
+
230
230
  def collection(elems_)
231
231
  ZMGeometryCollectionImpl.create(self, @zfactory.collection(elems_), @mfactory.collection(elems_))
232
232
  end
233
-
234
-
233
+
234
+
235
235
  # See ::RGeo::Feature::Factory#multi_point
236
-
236
+
237
237
  def multi_point(elems_)
238
238
  ZMGeometryCollectionImpl.create(self, @zfactory.multi_point(elems_), @mfactory.multi_point(elems_))
239
239
  end
240
-
241
-
240
+
241
+
242
242
  # See ::RGeo::Feature::Factory#multi_line_string
243
-
243
+
244
244
  def multi_line_string(elems_)
245
245
  ZMMultiLineStringImpl.create(self, @zfactory.multi_line_string(elems_), @mfactory.multi_line_string(elems_))
246
246
  end
247
-
248
-
247
+
248
+
249
249
  # See ::RGeo::Feature::Factory#multi_polygon
250
-
250
+
251
251
  def multi_polygon(elems_)
252
252
  ZMMultiPolygonImpl.create(self, @zfactory.multi_polygon(elems_), @mfactory.multi_polygon(elems_))
253
253
  end
254
-
255
-
254
+
255
+
256
256
  # See ::RGeo::Feature::Factory#proj4
257
-
257
+
258
258
  def proj4
259
259
  @zfactory.proj4
260
260
  end
261
-
262
-
261
+
262
+
263
263
  # See ::RGeo::Feature::Factory#coord_sys
264
-
264
+
265
265
  def coord_sys
266
266
  @zfactory.coord_sys
267
267
  end
268
-
269
-
268
+
269
+
270
270
  # See ::RGeo::Feature::Factory#override_cast
271
-
271
+
272
272
  def override_cast(original_, ntype_, flags_)
273
273
  return nil unless Geos.supported?
274
274
  keep_subtype_ = flags_[:keep_subtype]
@@ -302,11 +302,11 @@ module RGeo
302
302
  end
303
303
  false
304
304
  end
305
-
306
-
305
+
306
+
307
307
  end
308
-
309
-
308
+
309
+
310
310
  end
311
-
311
+
312
312
  end