Module: RGeo::Feature::Surface

Extended by:
Type
Includes:
Geometry
Included in:
Polygon
Defined in:
lib/rgeo/feature/surface.rb

Overview

SFS 1.1 Description

A Surface is a 2-dimensional geometric object.

A simple Surface consists of a single “patch” that is associated with one “exterior boundary” and 0 or more “interior” boundaries. Simple Surfaces in 3-dimensional space are isomorphic to planar Surfaces. Polyhedral Surfaces are formed by “stitching” together simple Surfaces along their boundaries, polyhedral Surfaces in 3-dimensional space may not be planar as a whole.

The boundary of a simple Surface is the set of closed Curves corresponding to its “exterior” and “interior” boundaries.

The only instantiable subclass of Surface defined in this specification, Polygon, is a simple Surface that is planar.

Notes

Surface 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

#areaObject

SFS 1.1 Description

The area of this Surface, as measured in the spatial reference system of this Surface.

Notes

Returns a floating-point scalar value.



50
51
52
# File 'lib/rgeo/feature/surface.rb', line 50

def area
  raise Error::UnsupportedOperation, "Method #{self.class.name}#area not defined."
end

#centroidObject

SFS 1.1 Description

The mathematical centroid for this Surface as a Point. The result is not guaranteed to be on this Surface.

Notes

Returns an object that supports the Point interface.



63
64
65
# File 'lib/rgeo/feature/surface.rb', line 63

def centroid
  raise Error::UnsupportedOperation, "Method #{self.class.name}#centroid not defined."
end

#point_on_surfaceObject

SFS 1.1 Description

A Point guaranteed to be on this Surface.

Notes

Returns an object that supports the Point interface.



75
76
77
# File 'lib/rgeo/feature/surface.rb', line 75

def point_on_surface
  raise Error::UnsupportedOperation, "Method #{self.class.name}#point_on_surface not defined."
end