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
  # MultiPoint feature 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,38 +35,38 @@
35
35
 
36
36
 
37
37
  module RGeo
38
-
38
+
39
39
  module Feature
40
-
41
-
40
+
41
+
42
42
  # == SFS 1.1 Description
43
- #
43
+ #
44
44
  # A MultiPoint is a 0-dimensional GeometryCollection. The elements of
45
45
  # a MultiPoint are restricted to Points. The Points are not connected
46
46
  # or ordered.
47
- #
47
+ #
48
48
  # A MultiPoint is simple if no two Points in the MultiPoint are equal
49
49
  # (have identical coordinate values).
50
- #
50
+ #
51
51
  # The boundary of a MultiPoint is the empty set.
52
- #
52
+ #
53
53
  # == Notes
54
- #
54
+ #
55
55
  # MultiPoint is defined as a module and is provided primarily
56
56
  # for the sake of documentation. Implementations need not necessarily
57
57
  # include this module itself. Therefore, you should not depend on the
58
58
  # kind_of? method to check type. Instead, use the provided check_type
59
59
  # class method (or === operator) defined in the Type module.
60
-
60
+
61
61
  module MultiPoint
62
-
62
+
63
63
  include GeometryCollection
64
64
  extend Type
65
-
66
-
65
+
66
+
67
67
  end
68
-
69
-
68
+
69
+
70
70
  end
71
-
71
+
72
72
  end
@@ -1,15 +1,15 @@
1
1
  # -----------------------------------------------------------------------------
2
- #
2
+ #
3
3
  # MultiPolygon feature 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,62 +35,62 @@
35
35
 
36
36
 
37
37
  module RGeo
38
-
38
+
39
39
  module Feature
40
-
41
-
40
+
41
+
42
42
  # == SFS 1.1 Description
43
- #
43
+ #
44
44
  # A MultiPolygon is a MultiSurface whose elements are Polygons.
45
- #
45
+ #
46
46
  # The assertions for MultiPolygons are as follows.
47
- #
47
+ #
48
48
  # a) The interiors of 2 Polygons that are elements of a MultiPolygon
49
49
  # may not intersect.
50
- #
50
+ #
51
51
  # b) The boundaries of any 2 Polygons that are elements of a
52
52
  # MultiPolygon may not "cross" and may touch at only a finite number
53
53
  # of Points. NOTE: Crossing is prevented by assertion (a) above.
54
- #
54
+ #
55
55
  # c) A MultiPolygon is defined as topologically closed.
56
- #
56
+ #
57
57
  # d) A MultiPolygon may not have cut lines, spikes or punctures, a
58
58
  # MultiPolygon is a regular closed Point set:
59
- #
59
+ #
60
60
  # e) The interior of a MultiPolygon with more than 1 Polygon is not
61
61
  # connected, the number of connected components of the interior of a
62
62
  # MultiPolygon is equal to the number of Polygons in the MultiPolygon.
63
- #
63
+ #
64
64
  # The boundary of a MultiPolygon is a set of closed Curves
65
65
  # (LineStrings) corresponding to the boundaries of its element
66
66
  # Polygons. Each Curve in the boundary of the MultiPolygon is in the
67
67
  # boundary of exactly 1 element Polygon, and every Curve in the
68
68
  # boundary of an element Polygon is in the boundary of the
69
69
  # MultiPolygon.
70
- #
70
+ #
71
71
  # NOTE: The subclass of Surface named Polyhedral Surface is a faceted
72
72
  # Surface whose facets are Polygons. A Polyhedral Surface is not a
73
73
  # MultiPolygon because it violates the rule for MultiPolygons that the
74
74
  # boundaries of the element Polygons intersect only at a finite number
75
75
  # of Points.
76
- #
76
+ #
77
77
  # == Notes
78
- #
78
+ #
79
79
  # MultiPolygon is defined as a module and is provided primarily
80
80
  # for the sake of documentation. Implementations need not necessarily
81
81
  # include this module itself. Therefore, you should not depend on the
82
82
  # kind_of? method to check type. Instead, use the provided check_type
83
83
  # class method (or === operator) defined in the Type module.
84
-
84
+
85
85
  module MultiPolygon
86
-
86
+
87
87
  include MultiSurface
88
88
  extend Type
89
-
90
-
89
+
90
+
91
91
  end
92
-
93
-
92
+
93
+
94
94
  end
95
-
95
+
96
96
  end
@@ -1,15 +1,15 @@
1
1
  # -----------------------------------------------------------------------------
2
- #
2
+ #
3
3
  # MultiSurface feature 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,81 +35,81 @@
35
35
 
36
36
 
37
37
  module RGeo
38
-
38
+
39
39
  module Feature
40
-
41
-
40
+
41
+
42
42
  # == SFS 1.1 Description
43
- #
43
+ #
44
44
  # A MultiSurface is a 2-dimensional GeometryCollection whose elements
45
45
  # are Surfaces. The interiors of any two Surfaces in a MultiSurface may
46
46
  # not intersect. The boundaries of any two elements in a MultiSurface
47
47
  # may intersect, at most, at a finite number of Points.
48
- #
48
+ #
49
49
  # MultiSurface is a non-instantiable class in this International
50
50
  # Standard. It defines a set of methods for its subclasses and is
51
51
  # included for reasons of extensibility. The instantiable subclass of
52
52
  # MultiSurface is MultiPolygon, corresponding to a collection of
53
53
  # Polygons.
54
- #
54
+ #
55
55
  # == Notes
56
- #
56
+ #
57
57
  # MultiSurface is defined as a module and is provided primarily
58
58
  # for the sake of documentation. Implementations need not necessarily
59
59
  # include this module itself. Therefore, you should not depend on the
60
60
  # kind_of? method to check type. Instead, use the provided check_type
61
61
  # class method (or === operator) defined in the Type module.
62
-
62
+
63
63
  module MultiSurface
64
-
64
+
65
65
  include GeometryCollection
66
66
  extend Type
67
-
68
-
67
+
68
+
69
69
  # === SFS 1.1 Description
70
- #
70
+ #
71
71
  # The area of this MultiSurface, as measured in the spatial reference
72
72
  # system of this MultiSurface.
73
- #
73
+ #
74
74
  # === Notes
75
- #
75
+ #
76
76
  # Returns a floating-point scalar value.
77
-
77
+
78
78
  def area
79
79
  raise Error::UnsupportedOperation, "Method MultiSurface#area not defined."
80
80
  end
81
-
82
-
81
+
82
+
83
83
  # === SFS 1.1 Description
84
- #
84
+ #
85
85
  # The mathematical centroid for this MultiSurface as a Point. The
86
86
  # result is not guaranteed to be on this MultiSurface.
87
- #
87
+ #
88
88
  # === Notes
89
- #
89
+ #
90
90
  # Returns an object that supports the Point interface.
91
-
91
+
92
92
  def centroid
93
93
  raise Error::UnsupportedOperation, "Method MultiSurface#centroid not defined."
94
94
  end
95
-
96
-
95
+
96
+
97
97
  # === SFS 1.1 Description
98
- #
98
+ #
99
99
  # A Point guaranteed to be on this MultiSurface.
100
- #
100
+ #
101
101
  # === Notes
102
- #
102
+ #
103
103
  # Returns an object that supports the Point interface.
104
-
104
+
105
105
  def point_on_surface
106
106
  raise Error::UnsupportedOperation, "Method MultiSurface#point_on_surface not defined."
107
107
  end
108
-
109
-
108
+
109
+
110
110
  end
111
-
112
-
111
+
112
+
113
113
  end
114
-
114
+
115
115
  end
@@ -1,15 +1,15 @@
1
1
  # -----------------------------------------------------------------------------
2
- #
2
+ #
3
3
  # Point feature 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,85 +35,85 @@
35
35
 
36
36
 
37
37
  module RGeo
38
-
38
+
39
39
  module Feature
40
-
41
-
40
+
41
+
42
42
  # == SFS 1.1 Description
43
- #
43
+ #
44
44
  # A Point is a 0-dimensional geometric object and represents a single
45
45
  # location in coordinate space. A Point has an x-coordinate value and
46
46
  # a y-coordinate value.
47
- #
47
+ #
48
48
  # The boundary of a Point is the empty set.
49
- #
49
+ #
50
50
  # == Notes
51
- #
51
+ #
52
52
  # Point is defined as a module and is provided primarily
53
53
  # for the sake of documentation. Implementations need not necessarily
54
54
  # include this module itself. Therefore, you should not depend on the
55
55
  # kind_of? method to check type. Instead, use the provided check_type
56
56
  # class method (or === operator) defined in the Type module.
57
- #
57
+ #
58
58
  # Some implementations may support higher dimensional points.
59
-
59
+
60
60
  module Point
61
-
61
+
62
62
  include Geometry
63
63
  extend Type
64
-
65
-
64
+
65
+
66
66
  # === SFS 1.1 Description
67
- #
67
+ #
68
68
  # The x-coordinate value for this Point.
69
- #
69
+ #
70
70
  # === Notes
71
- #
71
+ #
72
72
  # Returns a floating-point scalar value.
73
-
73
+
74
74
  def x
75
75
  raise Error::UnsupportedOperation, "Method Point#x not defined."
76
76
  end
77
-
78
-
77
+
78
+
79
79
  # === SFS 1.1 Description
80
- #
80
+ #
81
81
  # The y-coordinate value for this Point.
82
- #
82
+ #
83
83
  # === Notes
84
- #
84
+ #
85
85
  # Returns a floating-point scalar value.
86
-
86
+
87
87
  def y
88
88
  raise Error::UnsupportedOperation, "Method Point#y not defined."
89
89
  end
90
-
91
-
90
+
91
+
92
92
  # Returns the z-coordinate for this Point as a floating-point
93
93
  # scalar value.
94
- #
94
+ #
95
95
  # This method may not be available if the point's factory does
96
96
  # not support Z coordinates.
97
-
97
+
98
98
  def z
99
99
  raise Error::UnsupportedOperation, "Method Point#z not defined."
100
100
  end
101
-
102
-
101
+
102
+
103
103
  # Returns the m-coordinate for this Point as a floating-point
104
104
  # scalar value.
105
- #
105
+ #
106
106
  # This method may not be available if the point's factory does
107
107
  # not support M coordinates.
108
-
108
+
109
109
  def m
110
110
  raise Error::UnsupportedOperation, "Method Point#m not defined."
111
111
  end
112
-
113
-
112
+
113
+
114
114
  end
115
-
116
-
115
+
116
+
117
117
  end
118
-
118
+
119
119
  end