rgeo 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/History.rdoc +22 -0
  2. data/README.rdoc +124 -0
  3. data/Version +1 -0
  4. data/ext/geos_c_impl/extconf.rb +72 -0
  5. data/ext/geos_c_impl/factory.c +468 -0
  6. data/ext/geos_c_impl/factory.h +217 -0
  7. data/ext/geos_c_impl/geometry.c +644 -0
  8. data/ext/geos_c_impl/geometry.h +65 -0
  9. data/ext/geos_c_impl/geometry_collection.c +580 -0
  10. data/ext/geos_c_impl/geometry_collection.h +79 -0
  11. data/ext/geos_c_impl/globals.h +58 -0
  12. data/ext/geos_c_impl/line_string.c +468 -0
  13. data/ext/geos_c_impl/line_string.h +74 -0
  14. data/ext/geos_c_impl/main.c +65 -0
  15. data/ext/geos_c_impl/point.c +201 -0
  16. data/ext/geos_c_impl/point.h +77 -0
  17. data/ext/geos_c_impl/polygon.c +259 -0
  18. data/ext/geos_c_impl/polygon.h +76 -0
  19. data/ext/geos_c_impl/preface.h +42 -0
  20. data/lib/rgeo.rb +68 -0
  21. data/lib/rgeo/errors.rb +59 -0
  22. data/lib/rgeo/features.rb +89 -0
  23. data/lib/rgeo/features/curve.rb +155 -0
  24. data/lib/rgeo/features/factory.rb +191 -0
  25. data/lib/rgeo/features/geometry.rb +560 -0
  26. data/lib/rgeo/features/geometry_collection.rb +118 -0
  27. data/lib/rgeo/features/line.rb +65 -0
  28. data/lib/rgeo/features/line_string.rb +101 -0
  29. data/lib/rgeo/features/linear_ring.rb +65 -0
  30. data/lib/rgeo/features/multi_curve.rb +112 -0
  31. data/lib/rgeo/features/multi_line_string.rb +65 -0
  32. data/lib/rgeo/features/multi_point.rb +72 -0
  33. data/lib/rgeo/features/multi_polygon.rb +96 -0
  34. data/lib/rgeo/features/multi_surface.rb +115 -0
  35. data/lib/rgeo/features/point.rb +97 -0
  36. data/lib/rgeo/features/polygon.rb +141 -0
  37. data/lib/rgeo/features/surface.rb +121 -0
  38. data/lib/rgeo/geo_json.rb +58 -0
  39. data/lib/rgeo/geo_json/coder.rb +305 -0
  40. data/lib/rgeo/geo_json/entities.rb +284 -0
  41. data/lib/rgeo/geo_json/interface.rb +95 -0
  42. data/lib/rgeo/geography.rb +75 -0
  43. data/lib/rgeo/geography/common/geometry_collection_methods.rb +206 -0
  44. data/lib/rgeo/geography/common/geometry_methods.rb +92 -0
  45. data/lib/rgeo/geography/common/helper.rb +102 -0
  46. data/lib/rgeo/geography/common/line_string_methods.rb +187 -0
  47. data/lib/rgeo/geography/common/point_methods.rb +149 -0
  48. data/lib/rgeo/geography/common/polygon_methods.rb +122 -0
  49. data/lib/rgeo/geography/factories.rb +136 -0
  50. data/lib/rgeo/geography/factory.rb +246 -0
  51. data/lib/rgeo/geography/projected_window.rb +467 -0
  52. data/lib/rgeo/geography/simple_mercator/feature_classes.rb +320 -0
  53. data/lib/rgeo/geography/simple_mercator/feature_methods.rb +291 -0
  54. data/lib/rgeo/geography/simple_mercator/projector.rb +116 -0
  55. data/lib/rgeo/geography/simple_spherical/calculations.rb +70 -0
  56. data/lib/rgeo/geography/simple_spherical/geometry_collection_impl.rb +66 -0
  57. data/lib/rgeo/geography/simple_spherical/geometry_methods.rb +59 -0
  58. data/lib/rgeo/geography/simple_spherical/line_string_impl.rb +104 -0
  59. data/lib/rgeo/geography/simple_spherical/multi_line_string_impl.rb +67 -0
  60. data/lib/rgeo/geography/simple_spherical/multi_point_impl.rb +67 -0
  61. data/lib/rgeo/geography/simple_spherical/multi_polygon_impl.rb +67 -0
  62. data/lib/rgeo/geography/simple_spherical/point_impl.rb +85 -0
  63. data/lib/rgeo/geography/simple_spherical/polygon_impl.rb +66 -0
  64. data/lib/rgeo/geos.rb +72 -0
  65. data/lib/rgeo/geos/factory.rb +260 -0
  66. data/lib/rgeo/geos/impl_additions.rb +57 -0
  67. data/lib/rgeo/geos/interface.rb +74 -0
  68. data/lib/rgeo/version.rb +52 -0
  69. data/tests/geos/tc_factory.rb +91 -0
  70. data/tests/geos/tc_geometry_collection.rb +226 -0
  71. data/tests/geos/tc_line_string.rb +310 -0
  72. data/tests/geos/tc_misc.rb +72 -0
  73. data/tests/geos/tc_multi_line_string.rb +211 -0
  74. data/tests/geos/tc_multi_point.rb +202 -0
  75. data/tests/geos/tc_multi_polygon.rb +210 -0
  76. data/tests/geos/tc_point.rb +305 -0
  77. data/tests/geos/tc_polygon.rb +240 -0
  78. data/tests/simple_mercator/tc_point.rb +303 -0
  79. data/tests/simple_mercator/tc_window.rb +219 -0
  80. data/tests/tc_geojson.rb +230 -0
  81. data/tests/tc_oneoff.rb +61 -0
  82. metadata +162 -0
@@ -0,0 +1,118 @@
1
+ # -----------------------------------------------------------------------------
2
+ #
3
+ # GeometryCollection feature interface
4
+ #
5
+ # -----------------------------------------------------------------------------
6
+ # Copyright 2010 Daniel Azuma
7
+ #
8
+ # All rights reserved.
9
+ #
10
+ # Redistribution and use in source and binary forms, with or without
11
+ # modification, are permitted provided that the following conditions are met:
12
+ #
13
+ # * Redistributions of source code must retain the above copyright notice,
14
+ # this list of conditions and the following disclaimer.
15
+ # * Redistributions in binary form must reproduce the above copyright notice,
16
+ # this list of conditions and the following disclaimer in the documentation
17
+ # and/or other materials provided with the distribution.
18
+ # * Neither the name of the copyright holder, nor the names of any other
19
+ # contributors to this software, may be used to endorse or promote products
20
+ # derived from this software without specific prior written permission.
21
+ #
22
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
+ # POSSIBILITY OF SUCH DAMAGE.
33
+ # -----------------------------------------------------------------------------
34
+ ;
35
+
36
+
37
+ module RGeo
38
+
39
+ module Features
40
+
41
+
42
+ # == SFS 1.1 Description
43
+ #
44
+ # A GeometryCollection is a geometric object that is a collection of 1
45
+ # or more geometric objects.
46
+ #
47
+ # All the elements in a GeometryCollection shall be in the same Spatial
48
+ # Reference. This is also the Spatial Reference for the GeometryCollection.
49
+ #
50
+ # GeometryCollection places no other constraints on its elements.
51
+ # Subclasses of GeometryCollection may restrict membership based on
52
+ # dimension and may also place other constraints on the degree of spatial
53
+ # overlap between elements.
54
+ #
55
+ # == Notes
56
+ #
57
+ # GeometryCollection is defined as a module and is provided primarily
58
+ # for the sake of documentation. Implementations need not necessarily
59
+ # include this module itself. Therefore, you should not depend on the
60
+ # kind_of? method to check type. Instead, use the provided check_type
61
+ # class method. A corresponding === operator is also provided to
62
+ # to support case-when constructs.
63
+
64
+ module GeometryCollection
65
+
66
+ include Geometry
67
+ include ::Enumerable
68
+
69
+
70
+ # === SFS 1.1 Description
71
+ #
72
+ # Returns the number of geometries in this GeometryCollection.
73
+ #
74
+ # === Notes
75
+ #
76
+ # Returns an integer.
77
+
78
+ def num_geometries
79
+ raise Errors::MethodUnimplemented
80
+ end
81
+
82
+
83
+ # === SFS 1.1 Description
84
+ #
85
+ # Returns the Nth geometry in this GeometryCollection.
86
+ #
87
+ # === Notes
88
+ #
89
+ # Returns an object that supports the Geometry interface, or nil
90
+ # if the given n is out of range.
91
+
92
+ def geometry_n(n_)
93
+ raise Errors::MethodUnimplemented
94
+ end
95
+
96
+
97
+ alias_method :size, :num_geometries
98
+ alias_method :[], :geometry_n
99
+
100
+
101
+ # Iterates over the geometries of this GeometryCollection.
102
+ #
103
+ # This is not a standard SFS method, but is provided so that a
104
+ # GeometryCollection can behave as a Ruby enumerable.
105
+ # Note that all GeometryCollection implementations must also
106
+ # include the Enumerable mixin.
107
+
108
+ def each(&block_)
109
+ raise Errors::MethodUnimplemented
110
+ end
111
+
112
+
113
+ end
114
+
115
+
116
+ end
117
+
118
+ end
@@ -0,0 +1,65 @@
1
+ # -----------------------------------------------------------------------------
2
+ #
3
+ # Line feature interface
4
+ #
5
+ # -----------------------------------------------------------------------------
6
+ # Copyright 2010 Daniel Azuma
7
+ #
8
+ # All rights reserved.
9
+ #
10
+ # Redistribution and use in source and binary forms, with or without
11
+ # modification, are permitted provided that the following conditions are met:
12
+ #
13
+ # * Redistributions of source code must retain the above copyright notice,
14
+ # this list of conditions and the following disclaimer.
15
+ # * Redistributions in binary form must reproduce the above copyright notice,
16
+ # this list of conditions and the following disclaimer in the documentation
17
+ # and/or other materials provided with the distribution.
18
+ # * Neither the name of the copyright holder, nor the names of any other
19
+ # contributors to this software, may be used to endorse or promote products
20
+ # derived from this software without specific prior written permission.
21
+ #
22
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
+ # POSSIBILITY OF SUCH DAMAGE.
33
+ # -----------------------------------------------------------------------------
34
+ ;
35
+
36
+
37
+ module RGeo
38
+
39
+ module Features
40
+
41
+
42
+ # == SFS 1.1 Description
43
+ #
44
+ # A Line is a LineString with exactly 2 Points.
45
+ #
46
+ # == Notes
47
+ #
48
+ # Line is defined as a module and is provided primarily
49
+ # for the sake of documentation. Implementations need not necessarily
50
+ # include this module itself. Therefore, you should not depend on the
51
+ # kind_of? method to check type. Instead, use the provided check_type
52
+ # class method. A corresponding === operator is also provided to
53
+ # to support case-when constructs.
54
+
55
+ module Line
56
+
57
+ include LineString
58
+
59
+
60
+ end
61
+
62
+
63
+ end
64
+
65
+ end
@@ -0,0 +1,101 @@
1
+ # -----------------------------------------------------------------------------
2
+ #
3
+ # LineString feature interface
4
+ #
5
+ # -----------------------------------------------------------------------------
6
+ # Copyright 2010 Daniel Azuma
7
+ #
8
+ # All rights reserved.
9
+ #
10
+ # Redistribution and use in source and binary forms, with or without
11
+ # modification, are permitted provided that the following conditions are met:
12
+ #
13
+ # * Redistributions of source code must retain the above copyright notice,
14
+ # this list of conditions and the following disclaimer.
15
+ # * Redistributions in binary form must reproduce the above copyright notice,
16
+ # this list of conditions and the following disclaimer in the documentation
17
+ # and/or other materials provided with the distribution.
18
+ # * Neither the name of the copyright holder, nor the names of any other
19
+ # contributors to this software, may be used to endorse or promote products
20
+ # derived from this software without specific prior written permission.
21
+ #
22
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
+ # POSSIBILITY OF SUCH DAMAGE.
33
+ # -----------------------------------------------------------------------------
34
+ ;
35
+
36
+
37
+ module RGeo
38
+
39
+ module Features
40
+
41
+
42
+ # == SFS 1.1 Description
43
+ #
44
+ # A LineString is a Curve with linear interpolation between Points.
45
+ # Each consecutive pair of Points defines a Line segment.
46
+ #
47
+ # == Notes
48
+ #
49
+ # LineString is defined as a module and is provided primarily
50
+ # for the sake of documentation. Implementations need not necessarily
51
+ # include this module itself. Therefore, you should not depend on the
52
+ # kind_of? method to check type. Instead, use the provided check_type
53
+ # class method. A corresponding === operator is also provided to
54
+ # to support case-when constructs.
55
+
56
+ module LineString
57
+
58
+ include Curve
59
+
60
+
61
+ # === SFS 1.1 Description
62
+ #
63
+ # The number of Points in this LineString.
64
+ #
65
+ # === Notes
66
+ #
67
+ # Returns an integer.
68
+
69
+ def num_points
70
+ raise Errors::MethodUnimplemented
71
+ end
72
+
73
+
74
+ # === SFS 1.1 Description
75
+ #
76
+ # Returns the specified Point N in this LineString.
77
+ #
78
+ # === Notes
79
+ #
80
+ # Returns an object that supports the Point interface, or nil
81
+ # if the given n is out of range.
82
+
83
+ def point_n(n_)
84
+ raise Errors::MethodUnimplemented
85
+ end
86
+
87
+
88
+ # Returns the constituent points as an array of objects that
89
+ # support the Point interface.
90
+
91
+ def points
92
+ raise Errors::MethodUnimplemented
93
+ end
94
+
95
+
96
+ end
97
+
98
+
99
+ end
100
+
101
+ end
@@ -0,0 +1,65 @@
1
+ # -----------------------------------------------------------------------------
2
+ #
3
+ # LinearRing feature interface
4
+ #
5
+ # -----------------------------------------------------------------------------
6
+ # Copyright 2010 Daniel Azuma
7
+ #
8
+ # All rights reserved.
9
+ #
10
+ # Redistribution and use in source and binary forms, with or without
11
+ # modification, are permitted provided that the following conditions are met:
12
+ #
13
+ # * Redistributions of source code must retain the above copyright notice,
14
+ # this list of conditions and the following disclaimer.
15
+ # * Redistributions in binary form must reproduce the above copyright notice,
16
+ # this list of conditions and the following disclaimer in the documentation
17
+ # and/or other materials provided with the distribution.
18
+ # * Neither the name of the copyright holder, nor the names of any other
19
+ # contributors to this software, may be used to endorse or promote products
20
+ # derived from this software without specific prior written permission.
21
+ #
22
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
+ # POSSIBILITY OF SUCH DAMAGE.
33
+ # -----------------------------------------------------------------------------
34
+ ;
35
+
36
+
37
+ module RGeo
38
+
39
+ module Features
40
+
41
+
42
+ # == SFS 1.1 Description
43
+ #
44
+ # A LinearRing is a LineString that is both closed and simple.
45
+ #
46
+ # == Notes
47
+ #
48
+ # LinearRing is defined as a module and is provided primarily
49
+ # for the sake of documentation. Implementations need not necessarily
50
+ # include this module itself. Therefore, you should not depend on the
51
+ # kind_of? method to check type. Instead, use the provided check_type
52
+ # class method. A corresponding === operator is also provided to
53
+ # to support case-when constructs.
54
+
55
+ module LinearRing
56
+
57
+ include LineString
58
+
59
+
60
+ end
61
+
62
+
63
+ end
64
+
65
+ end
@@ -0,0 +1,112 @@
1
+ # -----------------------------------------------------------------------------
2
+ #
3
+ # MultiCurve feature interface
4
+ #
5
+ # -----------------------------------------------------------------------------
6
+ # Copyright 2010 Daniel Azuma
7
+ #
8
+ # All rights reserved.
9
+ #
10
+ # Redistribution and use in source and binary forms, with or without
11
+ # modification, are permitted provided that the following conditions are met:
12
+ #
13
+ # * Redistributions of source code must retain the above copyright notice,
14
+ # this list of conditions and the following disclaimer.
15
+ # * Redistributions in binary form must reproduce the above copyright notice,
16
+ # this list of conditions and the following disclaimer in the documentation
17
+ # and/or other materials provided with the distribution.
18
+ # * Neither the name of the copyright holder, nor the names of any other
19
+ # contributors to this software, may be used to endorse or promote products
20
+ # derived from this software without specific prior written permission.
21
+ #
22
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
+ # POSSIBILITY OF SUCH DAMAGE.
33
+ # -----------------------------------------------------------------------------
34
+ ;
35
+
36
+
37
+ module RGeo
38
+
39
+ module Features
40
+
41
+
42
+ # == SFS 1.1 Description
43
+ #
44
+ # A MultiCurve is a 1-dimensional GeometryCollection whose elements are
45
+ # Curves.
46
+ #
47
+ # MultiCurve is a non-instantiable class in this specification; it
48
+ # defines a set of methods for its subclasses and is included for
49
+ # reasons of extensibility.
50
+ #
51
+ # A MultiCurve is simple if and only if all of its elements are simple
52
+ # and the only intersections between any two elements occur at Points
53
+ # that are on the boundaries of both elements.
54
+ #
55
+ # The boundary of a MultiCurve is obtained by applying the "mod 2"
56
+ # union rule: A Point is in the boundary of a MultiCurve if it is in
57
+ # the boundaries of an odd number of elements of the MultiCurve.
58
+ #
59
+ # A MultiCurve is closed if all of its elements are closed. The
60
+ # boundary of a closed MultiCurve is always empty.
61
+ #
62
+ # A MultiCurve is defined as topologically closed.
63
+ #
64
+ # == Notes
65
+ #
66
+ # MultiCurve is defined as a module and is provided primarily
67
+ # for the sake of documentation. Implementations need not necessarily
68
+ # include this module itself. Therefore, you should not depend on the
69
+ # kind_of? method to check type. Instead, use the provided check_type
70
+ # class method. A corresponding === operator is also provided to
71
+ # to support case-when constructs.
72
+
73
+ module MultiCurve
74
+
75
+ include GeometryCollection
76
+
77
+
78
+ # === SFS 1.1 Description
79
+ #
80
+ # The Length of this MultiCurve which is equal to the sum of the
81
+ # lengths of the element Curves.
82
+ #
83
+ # === Notes
84
+ #
85
+ # Returns a floating-point scalar value.
86
+
87
+ def length
88
+ raise Errors::MethodUnimplemented
89
+ end
90
+
91
+
92
+ # === SFS 1.1 Description
93
+ #
94
+ # Returns true if this MultiCurve is closed [StartPoint() = EndPoint()
95
+ # for each Curve in this MultiCurve].
96
+ #
97
+ # === Notes
98
+ #
99
+ # Returns a boolean value. Note that this is different from the SFS
100
+ # specification, which stipulates an integer return value.
101
+
102
+ def is_closed?
103
+ raise Errors::MethodUnimplemented
104
+ end
105
+
106
+
107
+ end
108
+
109
+
110
+ end
111
+
112
+ end