Module: RGeo::Feature::Curve
Overview
SFS 1.1 Description
A Curve is a 1dimensional geometric object usually stored as a sequence of Points, with the subtype of Curve specifying the form of the interpolation between Points. This part of ISO 19125 defines only one subclass of Curve, LineString, which uses linear interpolation between Points.
A Curve is a 1dimensional geometric object that is the homeomorphic image of a real, closed interval D= under a mapping f:>R2.
A Curve is simple if it does not pass through the same Point twice.
A Curve is closed if its start Point is equal to its end Point.
The boundary of a closed Curve is empty.
A Curve that is simple and closed is a Ring.
The boundary of a nonclosed Curve consists of its two end Points.
A Curve is defined as topologically closed.
Notes
Curve is defined as a module and is provided primarily for the sake of documentation. Implementations need not necessarily include this module itself. Therefore, you should not depend on the kind_of? method to check type. Instead, use the provided check_type class method (or === operator) defined in the Type module.
Some implementations may support higher dimensional points.
Instance Method Summary collapse

#closed? ⇒ Boolean
SFS 1.1 Description.

#end_point ⇒ Object
SFS 1.1 Description.
 #is_closed? ⇒ Boolean
 #is_ring? ⇒ Boolean

#length ⇒ Object
SFS 1.1 Description.

#ring? ⇒ Boolean
SFS 1.1 Description.

#start_point ⇒ Object
SFS 1.1 Description.
Methods included from Type
add_subtype, check_type, each_immediate_subtype, extended, subtype_of?, supertype, type_name
Methods included from Geometry
#*, #+, #, #==, #as_binary, #as_text, #boundary, #buffer, #contains?, #convex_hull, #crosses?, #difference, #dimension, #disjoint?, #distance, #empty?, #envelope, #eql?, #equals?, #factory, #geometry_type, #intersection, #intersects?, #is_empty?, #is_simple?, #overlaps?, #relate?, #rep_equals?, #simple?, #srid, #sym_difference, #touches?, #unary_union, #union, #within?
Instance Method Details
#closed? ⇒ Boolean
SFS 1.1 Description
Returns true if this Curve is closed [StartPoint() = EndPoint()].
Notes
Returns a boolean value. Note that this is different from the SFS specification, which stipulates an integer return value.
93 94 95 
# File 'lib/rgeo/feature/curve.rb', line 93 def closed? raise Error::UnsupportedOperation, "Method Curve#closed? not defined." end 
#end_point ⇒ Object
SFS 1.1 Description
The end Point of this Curve.
Notes
Returns an object that supports the Point interface.
80 81 82 
# File 'lib/rgeo/feature/curve.rb', line 80 def end_point raise Error::UnsupportedOperation, "Method Curve#end_point not defined." end 
#is_closed? ⇒ Boolean
97 98 99 100 
# File 'lib/rgeo/feature/curve.rb', line 97 def is_closed? warn "The is_closed? method is deprecated, please use the closed? counterpart, will be removed in v3" unless ENV["RGEO_SILENCE_DEPRECATION"] closed? end 
#is_ring? ⇒ Boolean
117 118 119 120 
# File 'lib/rgeo/feature/curve.rb', line 117 def is_ring? warn "The is_ring? method is deprecated, please use the ring? counterpart, will be removed in v3" unless ENV["RGEO_SILENCE_DEPRECATION"] ring? end 
#length ⇒ Object
SFS 1.1 Description
The length of this Curve in its associated spatial reference.
Notes
Returns a floatingpoint scalar value.
56 57 58 
# File 'lib/rgeo/feature/curve.rb', line 56 def length raise Error::UnsupportedOperation, "Method Curve#length not defined." end 
#ring? ⇒ Boolean
SFS 1.1 Description
Returns true if this Curve is closed [StartPoint() = EndPoint()] and this Curve is simple (does not pass through the same Point more than once).
Notes
Returns a boolean value. Note that this is different from the SFS specification, which stipulates an integer return value.
113 114 115 
# File 'lib/rgeo/feature/curve.rb', line 113 def ring? raise Error::UnsupportedOperation, "Method Curve#ring? not defined." end 
#start_point ⇒ Object
SFS 1.1 Description
The start Point of this Curve.
Notes
Returns an object that supports the Point interface.
68 69 70 
# File 'lib/rgeo/feature/curve.rb', line 68 def start_point raise Error::UnsupportedOperation, "Method Curve#start_point not defined." end 