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
_add_subtype, check_type, each_immediate_subtype, extended, subtype_of?, supertype, 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, #relate?, #rep_equals?, #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.
34 35 36 |
# File 'lib/rgeo/feature/line_string.rb', line 34 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. N is zero-based. Does not support negative indexes.
48 49 50 |
# File 'lib/rgeo/feature/line_string.rb', line 48 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.
55 56 57 |
# File 'lib/rgeo/feature/line_string.rb', line 55 def points raise Error::UnsupportedOperation, "Method LineString#points not defined." end |