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.

Constant Summary

Constants included from Type

Type::Instance

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, #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

#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.



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

def area
  raise Error::UnsupportedOperation, "Method Surface#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.



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

def centroid
  raise Error::UnsupportedOperation, "Method Surface#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.



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

def point_on_surface
  raise Error::UnsupportedOperation, "Method Surface#point_on_surface not defined."
end