Module: RGeo::Feature::LineString
- Extended by:
- Type
- Includes:
- Curve
- Included in:
- Cartesian::LineStringImpl, Line, LinearRing, Geographic::ProjectedLineStringImpl, Geographic::SphericalLineStringImpl
- Defined in:
- lib/rgeo/feature/line_string.rb
Overview
SFS 1.1 Description
A LineString is a Curve with linear interpolation between Points. Each consecutive pair of Points defines a Line segment.
Notes
LineString 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.
Constant Summary
Constants included from Type
Instance Method Summary collapse
-
#num_points ⇒ Object
SFS 1.1 Description.
-
#point_n(n_) ⇒ Object
SFS 1.1 Description.
-
#points ⇒ Object
Returns the constituent points as an array of objects that support the Point interface.
Methods included from Type
check_type, subtype_of?, type_name
Methods included from Curve
#end_point, #is_closed?, #is_ring?, #length, #start_point
Methods included from Geometry
#*, #+, #-, #==, #as_binary, #as_text, #boundary, #buffer, #contains?, #convex_hull, #crosses?, #difference, #dimension, #disjoint?, #distance, #envelope, #eql?, #equals?, #factory, #geometry_type, #intersection, #intersects?, #is_empty?, #is_simple?, #overlaps?, #relate, #srid, #sym_difference, #touches?, #union, #within?
Instance Method Details
#num_points ⇒ Object
SFS 1.1 Description
The number of Points in this LineString.
Notes
Returns an integer.
70 71 72 |
# File 'lib/rgeo/feature/line_string.rb', line 70 def num_points raise Error::UnsupportedOperation, "Method LineString#num_points not defined." end |
#point_n(n_) ⇒ Object
SFS 1.1 Description
Returns the specified Point N in this LineString.
Notes
Returns an object that supports the Point interface, or nil if the given n is out of range.
84 85 86 |
# File 'lib/rgeo/feature/line_string.rb', line 84 def point_n(n_) raise Error::UnsupportedOperation, "Method LineString#point_n not defined." end |
#points ⇒ Object
Returns the constituent points as an array of objects that support the Point interface.
92 93 94 |
# File 'lib/rgeo/feature/line_string.rb', line 92 def points raise Error::UnsupportedOperation, "Method LineString#points not defined." end |