rgeo 0.1.21 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/History.rdoc +11 -0
  2. data/README.rdoc +1 -1
  3. data/Spatial_Programming_With_RGeo.rdoc +382 -0
  4. data/Version +1 -1
  5. data/lib/active_record/connection_adapters/postgis_adapter.rb +1 -1
  6. data/lib/rgeo.rb +4 -4
  7. data/lib/rgeo/active_record/base_modifications.rb +1 -1
  8. data/lib/rgeo/all.rb +1 -1
  9. data/lib/rgeo/cartesian/bounding_box.rb +2 -2
  10. data/lib/rgeo/cartesian/factory.rb +18 -11
  11. data/lib/rgeo/cartesian/interface.rb +4 -4
  12. data/lib/rgeo/coord_sys.rb +8 -1
  13. data/lib/rgeo/coord_sys/proj4.rb +4 -4
  14. data/lib/rgeo/feature/factory.rb +68 -49
  15. data/lib/rgeo/feature/factory_generator.rb +2 -2
  16. data/lib/rgeo/feature/types.rb +4 -4
  17. data/lib/rgeo/geo_json/coder.rb +5 -5
  18. data/lib/rgeo/{geography.rb → geographic.rb} +15 -15
  19. data/lib/rgeo/{geography → geographic}/factory.rb +27 -20
  20. data/lib/rgeo/{geography → geographic}/interface.rb +43 -29
  21. data/lib/rgeo/{geography → geographic}/proj4_projector.rb +2 -2
  22. data/lib/rgeo/{geography → geographic}/projected_feature_classes.rb +2 -2
  23. data/lib/rgeo/{geography → geographic}/projected_feature_methods.rb +2 -2
  24. data/lib/rgeo/{geography → geographic}/projected_window.rb +5 -5
  25. data/lib/rgeo/{geography → geographic}/simple_mercator_projector.rb +2 -2
  26. data/lib/rgeo/{geography → geographic}/spherical_feature_classes.rb +2 -2
  27. data/lib/rgeo/{geography → geographic}/spherical_feature_methods.rb +2 -2
  28. data/lib/rgeo/{geography → geographic}/spherical_math.rb +1 -1
  29. data/lib/rgeo/geos/factory.rb +22 -15
  30. data/lib/rgeo/geos/interface.rb +3 -3
  31. data/lib/rgeo/geos/zm_factory.rb +20 -6
  32. data/lib/rgeo/impl_helper/basic_point_methods.rb +2 -2
  33. data/lib/rgeo/shapefile/reader.rb +5 -5
  34. data/lib/rgeo/wkrep/wkb_generator.rb +2 -2
  35. data/lib/rgeo/wkrep/wkb_parser.rb +4 -4
  36. data/lib/rgeo/wkrep/wkt_generator.rb +2 -2
  37. data/lib/rgeo/wkrep/wkt_parser.rb +7 -7
  38. data/test/active_record/common_setup_methods.rb +1 -1
  39. data/test/geos/tc_point.rb +3 -3
  40. data/test/geos/tc_zmfactory.rb +7 -7
  41. data/test/{projected_geography → projected_geographic}/tc_geometry_collection.rb +2 -2
  42. data/test/{projected_geography → projected_geographic}/tc_line_string.rb +2 -2
  43. data/test/{projected_geography → projected_geographic}/tc_multi_line_string.rb +2 -2
  44. data/test/{projected_geography → projected_geographic}/tc_multi_point.rb +2 -2
  45. data/test/{projected_geography → projected_geographic}/tc_multi_polygon.rb +3 -3
  46. data/test/{projected_geography → projected_geographic}/tc_point.rb +5 -5
  47. data/test/{projected_geography → projected_geographic}/tc_polygon.rb +2 -2
  48. data/test/shapefile/tc_shapelib_tests.rb +10 -10
  49. data/test/simple_cartesian/tc_point.rb +3 -3
  50. data/test/simple_mercator/tc_geometry_collection.rb +1 -1
  51. data/test/simple_mercator/tc_line_string.rb +1 -1
  52. data/test/simple_mercator/tc_multi_line_string.rb +1 -1
  53. data/test/simple_mercator/tc_multi_point.rb +1 -1
  54. data/test/simple_mercator/tc_multi_polygon.rb +2 -2
  55. data/test/simple_mercator/tc_point.rb +4 -4
  56. data/test/simple_mercator/tc_polygon.rb +1 -1
  57. data/test/simple_mercator/tc_window.rb +39 -39
  58. data/test/spherical_geographic/tc_calculations.rb +203 -0
  59. data/test/{spherical_geography → spherical_geographic}/tc_geometry_collection.rb +2 -2
  60. data/test/{spherical_geography → spherical_geographic}/tc_line_string.rb +2 -2
  61. data/test/{spherical_geography → spherical_geographic}/tc_multi_line_string.rb +2 -2
  62. data/test/{spherical_geography → spherical_geographic}/tc_multi_point.rb +2 -2
  63. data/test/{spherical_geography → spherical_geographic}/tc_multi_polygon.rb +3 -3
  64. data/test/{spherical_geography → spherical_geographic}/tc_point.rb +6 -6
  65. data/test/{spherical_geography → spherical_geographic}/tc_polygon.rb +2 -2
  66. data/test/tc_geojson.rb +3 -3
  67. data/test/tc_oneoff.rb +5 -5
  68. data/test/wkrep/tc_wkb_generator.rb +3 -3
  69. data/test/wkrep/tc_wkb_parser.rb +16 -16
  70. data/test/wkrep/tc_wkt_generator.rb +3 -3
  71. data/test/wkrep/tc_wkt_parser.rb +21 -21
  72. metadata +46 -44
  73. data/test/spherical_geography/tc_calculations.rb +0 -203
@@ -68,7 +68,7 @@ module ActiveRecord
68
68
  class_attribute :rgeo_factory_generator, :instance_writer => false
69
69
  self.rgeo_factory_generator = ::Proc.new do |config_|
70
70
  if config_.delete(:geographic)
71
- ::RGeo::Geography.spherical_factory(config_)
71
+ ::RGeo::Geographic.spherical_factory(config_)
72
72
  else
73
73
  ::RGeo::Cartesian.preferred_factory(config_)
74
74
  end
data/lib/rgeo/all.rb CHANGED
@@ -44,6 +44,6 @@ require 'rgeo/impl_helper'
44
44
  require 'rgeo/wkrep'
45
45
  require 'rgeo/geos'
46
46
  require 'rgeo/cartesian'
47
- require 'rgeo/geography'
47
+ require 'rgeo/geographic'
48
48
  require 'rgeo/geo_json'
49
49
  require 'rgeo/shapefile'
@@ -73,8 +73,8 @@ module RGeo
73
73
 
74
74
  def initialize(factory_, opts_={})
75
75
  @factory = factory_
76
- @has_z = !opts_[:ignore_z] && factory_.has_capability?(:z_coordinate) ? true : false
77
- @has_m = !opts_[:ignore_m] && factory_.has_capability?(:m_coordinate) ? true : false
76
+ @has_z = !opts_[:ignore_z] && factory_.property(:has_z_coordinate) ? true : false
77
+ @has_m = !opts_[:ignore_m] && factory_.property(:has_m_coordinate) ? true : false
78
78
  @min_x = @max_x = @min_y = @max_y = @min_z = @max_z = @min_m = @max_m = nil
79
79
  end
80
80
 
@@ -53,8 +53,8 @@ module RGeo
53
53
 
54
54
  def initialize(opts_={})
55
55
  @srid = opts_[:srid].to_i
56
- @support_z = opts_[:support_z_coordinate] ? true : false
57
- @support_m = opts_[:support_m_coordinate] ? true : false
56
+ @has_z = opts_[:has_z_coordinate] ? true : false
57
+ @has_m = opts_[:has_m_coordinate] ? true : false
58
58
  @proj4 = opts_[:proj4]
59
59
  if CoordSys::Proj4.supported?
60
60
  if @proj4.kind_of?(::String) || @proj4.kind_of?(::Hash)
@@ -69,7 +69,7 @@ module RGeo
69
69
  # Equivalence test.
70
70
 
71
71
  def eql?(rhs_)
72
- rhs_.is_a?(self.class) && @srid == rhs_.srid
72
+ rhs_.is_a?(self.class) && @srid == rhs_.srid && @has_z == rhs_.property(:has_z_coordinate) && @has_m == rhs_.property(:has_m_coordinate)
73
73
  end
74
74
  alias_method :==, :eql?
75
75
 
@@ -81,16 +81,16 @@ module RGeo
81
81
  end
82
82
 
83
83
 
84
- # See ::RGeo::Feature::Factory#has_capability?
84
+ # See ::RGeo::Feature::Factory#property
85
85
 
86
- def has_capability?(name_)
86
+ def property(name_)
87
87
  case name_
88
- when :z_coordinate
89
- @support_z
90
- when :m_coordinate
91
- @support_m
92
- when :proj4
93
- !@proj4.nil?
88
+ when :has_z_coordinate
89
+ @has_z
90
+ when :has_m_coordinate
91
+ @has_m
92
+ when :is_cartesian
93
+ true
94
94
  else
95
95
  nil
96
96
  end
@@ -181,6 +181,13 @@ module RGeo
181
181
  end
182
182
 
183
183
 
184
+ # See ::RGeo::Feature::Factory#coord_sys
185
+
186
+ def coord_sys
187
+ nil
188
+ end
189
+
190
+
184
191
  end
185
192
 
186
193
 
@@ -89,10 +89,10 @@ module RGeo
89
89
  # <tt>:srid</tt>::
90
90
  # Set the SRID returned by geometries created by this factory.
91
91
  # Default is 0.
92
- # <tt>:support_z_coordinate</tt>::
93
- # Support <tt>z_coordinate</tt>. Default is false.
94
- # <tt>:support_m_coordinate</tt>::
95
- # Support <tt>m_coordinate</tt>. Default is false.
92
+ # <tt>:has_z_coordinate</tt>::
93
+ # Support a Z coordinate. Default is false.
94
+ # <tt>:has_m_coordinate</tt>::
95
+ # Support an M coordinate. Default is false.
96
96
 
97
97
  def simple_factory(opts_={})
98
98
  Cartesian::Factory.new(opts_)
@@ -41,7 +41,14 @@ require 'rgeo'
41
41
  module RGeo
42
42
 
43
43
 
44
- # Coordinate reference systems.
44
+ # This module provides data structures and tools related to coordinate
45
+ # systems and coordinate transforms.
46
+ #
47
+ # Currently, the Proj4 class provides a wrapper around the proj4
48
+ # library, which specifies geographic and projected coordinate systems
49
+ # and performs transformations. In the future, this module will also
50
+ # contain an implementation of the OGC coordinate transformation
51
+ # specification.
45
52
 
46
53
  module CoordSys
47
54
  end
@@ -240,10 +240,10 @@ module RGeo
240
240
 
241
241
  def _transform_point(from_proj_, from_point_, to_proj_, to_factory_) # :nodoc:
242
242
  from_factory_ = from_point_.factory
243
- from_has_z_ = from_factory_.has_capability?(:z_coordinate)
244
- from_has_m_ = from_factory_.has_capability?(:m_coordinate)
245
- to_has_z_ = to_factory_.has_capability?(:z_coordinate)
246
- to_has_m_ = to_factory_.has_capability?(:m_coordinate)
243
+ from_has_z_ = from_factory_.property(:has_z_coordinate)
244
+ from_has_m_ = from_factory_.property(:has_m_coordinate)
245
+ to_has_z_ = to_factory_.property(:has_z_coordinate)
246
+ to_has_m_ = to_factory_.property(:has_m_coordinate)
247
247
  coords_ = _transform_coords(from_proj_, to_proj_, from_point_.x, from_point_.y,
248
248
  from_has_z_ ? from_point_.z : nil)
249
249
  extras_ = []
@@ -72,35 +72,42 @@ module RGeo
72
72
  end
73
73
 
74
74
 
75
- # Determine support for the given capability, identified by a
76
- # symbolic name. This method may be used to test this factory, and
77
- # any features created by it, to determine whether they support
78
- # certain capabilities or operations. Most queries return a boolean
79
- # value, though some may return other values to indicate different
80
- # levels of support. Generally speaking, if a query returns a false
81
- # or nil value, support for that capability is not guaranteed, and
82
- # calls related to that function may fail or raise exceptions.
75
+ # Returns meta-information about this factory, by key. This
76
+ # information may involve support for optional functionality,
77
+ # properties of the coordinate system, or other characteristics.
83
78
  #
84
- # Each capability must have a symbolic name. Names that have no
85
- # periods are considered well-known names and are reserved for use
86
- # by RGeo. If you want to define your own capabilities, use a name
87
- # that is namespaced, such as <tt>:'mycompany.mycapability'</tt>.
79
+ # Each property has a symbolic name. Names that have no periods are
80
+ # considered well-known names and are reserved for use by RGeo. If
81
+ # you want to define your own capabilities, use a name that is
82
+ # namespaced with periods, such as <tt>:'mycompany.myprop'</tt>.
88
83
  #
89
- # Currently defined standard capabilities are:
84
+ # Property values are dependent on the individual property.
85
+ # Generally, properties that involve testing for functionality
86
+ # should return true if the functionality is support, or false or
87
+ # nil if not. A property value could also invlove different values
88
+ # indicating different levels of support. In any case, the factory
89
+ # should return nil for property names it does not recognize. This
90
+ # value is considered the "default" or "no value" value.
90
91
  #
91
- # <tt>:z_coordinate</tt>::
92
- # Supports a "z" coordinate. When an implementation supports
93
- # this capability, geometries know about Z coordinates, and the
94
- # Point#z method is available.
95
- # <tt>:m_coordinate</tt>::
96
- # Supports an "m" coordinate. When an implementation supports
97
- # this capability, geometries know about M coordinates, and the
98
- # Point#m method is available.
99
- # <tt>:proj4</tt>::
100
- # Has a proj4-defined projection. When an implementation supports
101
- # this capability, the Factory#proj4 method is available.
102
-
103
- def has_capability?(name_)
92
+ # Currently defined well-known properties are:
93
+ #
94
+ # <tt>:has_z_coordinate</tt>::
95
+ # Set to true if geometries created by this factory include a Z
96
+ # coordinate, and the Point#z method is available.
97
+ # <tt>:has_m_coordinate</tt>::
98
+ # Set to true if geometries created by this factory include a M
99
+ # coordinate, and the Point#z method is available.
100
+ # <tt>:is_cartesian</tt>::
101
+ # Set to true if this Factory guarantees that it operates in
102
+ # Cartesian geometry. If false or nil, no such guarantee is made,
103
+ # though it is possible the geometries may still be Cartesian.
104
+ # <tt>:is_geographic</tt>::
105
+ # Set to true if this Factory's coordinate system is meant to be
106
+ # interpreted as x=longitude and y=latitude. If false or nil, no
107
+ # information is present about whether the coordinate system is
108
+ # meant to be so interpreted.
109
+
110
+ def property(name_)
104
111
  nil
105
112
  end
106
113
 
@@ -135,7 +142,7 @@ module RGeo
135
142
 
136
143
  # Create a feature of type LineString.
137
144
  # The given points argument should be an Enumerable of Point
138
- # objects, or objects that can be casted to Point.
145
+ # objects, or objects that can be cast to Point.
139
146
 
140
147
  def line_string(points_)
141
148
  nil
@@ -144,7 +151,7 @@ module RGeo
144
151
 
145
152
  # Create a feature of type Line.
146
153
  # The given point arguments should be Point objects, or objects
147
- # that can be casted to Point.
154
+ # that can be cast to Point.
148
155
 
149
156
  def line(start_, end_)
150
157
  nil
@@ -153,7 +160,7 @@ module RGeo
153
160
 
154
161
  # Create a feature of type LinearRing.
155
162
  # The given points argument should be an Enumerable of Point
156
- # objects, or objects that can be casted to Point.
163
+ # objects, or objects that can be cast to Point.
157
164
  # If the first and last points are not equal, the ring is
158
165
  # automatically closed by appending the first point to the end of the
159
166
  # string.
@@ -165,7 +172,7 @@ module RGeo
165
172
 
166
173
  # Create a feature of type Polygon.
167
174
  # The outer_ring should be a LinearRing, or an object that can be
168
- # casted to LinearRing.
175
+ # cast to LinearRing.
169
176
  # The inner_rings should be a possibly empty Enumerable of
170
177
  # LinearRing (or objects that can be casted to LinearRing).
171
178
  # You may also pass nil to indicate no inner rings.
@@ -185,7 +192,7 @@ module RGeo
185
192
 
186
193
  # Create a feature of type MultiPoint.
187
194
  # The elems should be an Enumerable of Point objects, or objects
188
- # that can be casted to Point.
195
+ # that can be cast to Point.
189
196
  # Returns nil if any of the contained geometries is not a Point,
190
197
  # which would break the MultiPoint contract.
191
198
 
@@ -196,7 +203,7 @@ module RGeo
196
203
 
197
204
  # Create a feature of type MultiLineString.
198
205
  # The elems should be an Enumerable of objects that are or can be
199
- # casted to LineString or any of its subclasses.
206
+ # cast to LineString or any of its subclasses.
200
207
  # Returns nil if any of the contained geometries is not a
201
208
  # LineString, which would break the MultiLineString contract.
202
209
 
@@ -207,17 +214,39 @@ module RGeo
207
214
 
208
215
  # Create a feature of type MultiPolygon.
209
216
  # The elems should be an Enumerable of objects that are or can be
210
- # casted to Polygon or any of its subclasses.
217
+ # cast to Polygon or any of its subclasses.
211
218
  # Returns nil if any of the contained geometries is not a Polygon,
212
219
  # which would break the MultiPolygon contract.
213
220
  # Also returns nil if any of the other assertions for MultiPolygon
214
- # are not met-- e.g. if any of the polygons overlap.
221
+ # are not met, e.g. if any of the polygons overlap.
215
222
 
216
223
  def multi_polygon(elems_)
217
224
  nil
218
225
  end
219
226
 
220
227
 
228
+ # Returns a RGeo::CoordSys::Proj4 representing the projection for
229
+ # the coordinate system of features created by this factory, or nil
230
+ # if there is no such proj4 projection.
231
+
232
+ def proj4
233
+ nil
234
+ end
235
+
236
+
237
+ # Returns the coordinate system specification for the features
238
+ # created by this factory, or nil if there is no such coordinate
239
+ # system.
240
+ #
241
+ # NOTE: This is a required method of the factory interface, but the
242
+ # coordinate system objects themselves are not yet available, so
243
+ # implementations should just return nil for now.
244
+
245
+ def coord_sys
246
+ nil
247
+ end
248
+
249
+
221
250
  # This is an optional method that may be implemented to customize
222
251
  # casting for this factory. Basically, RGeo defines standard ways
223
252
  # to cast certain types of objects from one factory to another and
@@ -237,11 +266,14 @@ module RGeo
237
266
  # of the current type
238
267
  # <tt>:force_new</tt>::
239
268
  # indicates whether to force the creation of a new object even if
240
- # the original is already of the desired factory and type.
269
+ # the original is already of the desired factory and type
270
+ # <tt>:project</tt>::
271
+ # indicates whether to project the coordinates from the source to
272
+ # the destination proj4 coordinate system, if available
241
273
  #
242
274
  # It should return either a casted result object, false, or nil.
243
275
  # A nil return value indicates that casting should be forced to
244
- # fail (and ::RGeo::Feature::cast will return nil).
276
+ # fail (and RGeo::Feature::cast will return nil).
245
277
  # A false return value indicates that this method declines to
246
278
  # override the casting algorithm, and RGeo should use its default
247
279
  # algorithm to cast the object. Therefore, by default, you should
@@ -252,19 +284,6 @@ module RGeo
252
284
  end
253
285
 
254
286
 
255
- # This is an optional method that returns a RGeo::CoordSys::Proj4
256
- # representing the projection for the coordinate system of features
257
- # created by this factory, or nil if there is no such proj4
258
- # projection.
259
- #
260
- # If a factory supports this method, it should indicate this by
261
- # returning true for the <tt>:proj4</tt> capability.
262
-
263
- def proj4
264
- nil
265
- end
266
-
267
-
268
287
  end
269
288
 
270
289
 
@@ -89,10 +89,10 @@ module RGeo
89
89
  # <tt>:srid</tt>::
90
90
  # The SRID for the factory and objects it creates.
91
91
  # Default is usually 0.
92
- # <tt>:support_z_coordinate</tt>::
92
+ # <tt>:has_z_coordinate</tt>::
93
93
  # Support the <tt>z_coordinate</tt> capability.
94
94
  # Default is usually false.
95
- # <tt>:support_m_coordinate</tt>::
95
+ # <tt>:has_m_coordinate</tt>::
96
96
  # Support the <tt>m_coordinate</tt> capability.
97
97
  # Default is usually false.
98
98
 
@@ -189,12 +189,12 @@ module RGeo
189
189
  else
190
190
  if type_ == Point
191
191
  proj_ = nproj_ = nil
192
- if project_ && factory_.has_capability?(:proj4) && nfactory_.has_capability?(:proj4)
192
+ if project_
193
193
  proj_ = factory_.proj4
194
194
  nproj_ = nfactory_.proj4
195
195
  end
196
- hasz_ = factory_.has_capability?(:z_coordinate)
197
- nhasz_ = nfactory_.has_capability?(:z_coordinate)
196
+ hasz_ = factory_.property(:has_z_coordinate)
197
+ nhasz_ = nfactory_.property(:has_z_coordinate)
198
198
  if proj_ && nproj_
199
199
  coords_ = CoordSys::Proj4.transform_coords(proj_, nproj_, obj_.x, obj_.y, hasz_ ? obj_.z : nil)
200
200
  coords_ << (hasz_ ? obj_.z : 0.0) if nhasz_ && coords_.size < 3
@@ -202,7 +202,7 @@ module RGeo
202
202
  coords_ = [obj_.x, obj_.y]
203
203
  coords_ << (hasz_ ? obj_.z : 0.0) if nhasz_
204
204
  end
205
- coords_ << (factory_.has_capability?(:m_coordinate) ? obj_.m : 0.0) if nfactory_.has_capability?(:m_coordinate)
205
+ coords_ << (factory_.property(:has_m_coordinate) ? obj_.m : 0.0) if nfactory_.property(:has_m_coordinate)
206
206
  nfactory_.point(*coords_)
207
207
  elsif type_ == Line
208
208
  nfactory_.line(cast(obj_.start_point, nfactory_, opts_), cast(obj_.end_point, nfactory_, opts_))
@@ -131,8 +131,8 @@ module RGeo
131
131
  raise ::ArgumentError, "Unrecognzied json_parser: #{@json_parser.inspect}"
132
132
  end
133
133
  @num_coordinates = 2
134
- @num_coordinates += 1 if @geo_factory.has_capability?(:z_coordinate)
135
- @num_coordinates += 1 if @geo_factory.has_capability?(:m_coordinate)
134
+ @num_coordinates += 1 if @geo_factory.property(:has_z_coordinate)
135
+ @num_coordinates += 1 if @geo_factory.property(:has_m_coordinate)
136
136
  end
137
137
 
138
138
 
@@ -222,14 +222,14 @@ module RGeo
222
222
 
223
223
  def _encode_geometry(object_, point_encoder_=nil) # :nodoc:
224
224
  unless point_encoder_
225
- if object_.factory.has_capability?(:z_coordinate)
226
- if object_.factory.has_capability?(:m_coordinate)
225
+ if object_.factory.property(:has_z_coordinate)
226
+ if object_.factory.property(:has_m_coordinate)
227
227
  point_encoder_ = ::Proc.new{ |p_| [p_.x, p_.y, p_.z, p_.m] }
228
228
  else
229
229
  point_encoder_ = ::Proc.new{ |p_| [p_.x, p_.y, p_.z] }
230
230
  end
231
231
  else
232
- if object_.factory.has_capability?(:m_coordinate)
232
+ if object_.factory.property(:has_m_coordinate)
233
233
  point_encoder_ = ::Proc.new{ |p_| [p_.x, p_.y, p_.m] }
234
234
  else
235
235
  point_encoder_ = ::Proc.new{ |p_| [p_.x, p_.y] }
@@ -41,25 +41,25 @@ require 'rgeo'
41
41
  module RGeo
42
42
 
43
43
 
44
- # The Geography implementation actually comprises a suite of
44
+ # The Geographic implementation actually comprises a suite of
45
45
  # implementations with one common feature: they represent geographic
46
46
  # latitude/longitude coordinates measured in degrees. The "x"
47
47
  # coordinate corresponds to longitude, and the "y" coordinate to
48
48
  # latitude. Thus, coordinates are often expressed in reverse
49
49
  # (i.e. long-lat) order. e.g.
50
50
  #
51
- # location = geography_factory.point(long, lat)
51
+ # location = geographic_factory.point(long, lat)
52
52
  #
53
- # Some geography implementations include a secondary factory that
53
+ # Some geographic implementations include a secondary factory that
54
54
  # represents a projection. For these implementations, you can quickly
55
55
  # transform data between lat/long coordinates and the projected
56
56
  # coordinate system, and most calculations are done in the projected
57
57
  # coordinate system. For implementations that do not include this
58
58
  # secondary projection factory, calculations are done on the sphereoid.
59
- # See the various class methods of Geography for more information on
59
+ # See the various class methods of Geographic for more information on
60
60
  # the behaviors of the factories they generate.
61
61
 
62
- module Geography
62
+ module Geographic
63
63
  end
64
64
 
65
65
 
@@ -74,13 +74,13 @@ require 'rgeo/impl_helper'
74
74
  require 'rgeo/cartesian'
75
75
 
76
76
  # Implementation files.
77
- require 'rgeo/geography/factory'
78
- require 'rgeo/geography/projected_window'
79
- require 'rgeo/geography/interface'
80
- require 'rgeo/geography/spherical_math'
81
- require 'rgeo/geography/spherical_feature_methods'
82
- require 'rgeo/geography/spherical_feature_classes'
83
- require 'rgeo/geography/proj4_projector'
84
- require 'rgeo/geography/simple_mercator_projector'
85
- require 'rgeo/geography/projected_feature_methods'
86
- require 'rgeo/geography/projected_feature_classes'
77
+ require 'rgeo/geographic/factory'
78
+ require 'rgeo/geographic/projected_window'
79
+ require 'rgeo/geographic/interface'
80
+ require 'rgeo/geographic/spherical_math'
81
+ require 'rgeo/geographic/spherical_feature_methods'
82
+ require 'rgeo/geographic/spherical_feature_classes'
83
+ require 'rgeo/geographic/proj4_projector'
84
+ require 'rgeo/geographic/simple_mercator_projector'
85
+ require 'rgeo/geographic/projected_feature_methods'
86
+ require 'rgeo/geographic/projected_feature_classes'