Module: RGeo::Feature::Curve

Extended by:
Type
Includes:
Geometry
Included in:
LineString
Defined in:
lib/rgeo/feature/curve.rb

Overview

SFS 1.1 Description

A Curve is a 1-dimensional 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 1-dimensional 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 non-closed 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

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, #coordinate_dimension, #crosses?, #difference, #dimension, #disjoint?, #distance, #empty?, #envelope, #eql?, #equals?, #factory, #geometry_type, #intersection, #intersects?, #is_3d?, #locate_along, #locate_between, #measured?, #overlaps?, #relate?, #rep_equals?, #simple?, #spatial_dimension, #srid, #sym_difference, #touches?, #transform, #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.

Returns:

  • (Boolean)

Raises:



92
93
94
# File 'lib/rgeo/feature/curve.rb', line 92

def closed?
  raise Error::UnsupportedOperation, "Method Curve#closed? not defined."
end

#end_pointObject

SFS 1.1 Description

The end Point of this Curve.

Notes

Returns an object that supports the Point interface.



79
80
81
# File 'lib/rgeo/feature/curve.rb', line 79

def end_point
  raise Error::UnsupportedOperation, "Method Curve#end_point not defined."
end

#lengthObject

SFS 1.1 Description

The length of this Curve in its associated spatial reference.

Notes

Returns a floating-point scalar value.



55
56
57
# File 'lib/rgeo/feature/curve.rb', line 55

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.

Returns:

  • (Boolean)

Raises:



107
108
109
# File 'lib/rgeo/feature/curve.rb', line 107

def ring?
  raise Error::UnsupportedOperation, "Method Curve#ring? not defined."
end

#start_pointObject

SFS 1.1 Description

The start Point of this Curve.

Notes

Returns an object that supports the Point interface.



67
68
69
# File 'lib/rgeo/feature/curve.rb', line 67

def start_point
  raise Error::UnsupportedOperation, "Method Curve#start_point not defined."
end