Module: RGeo::Feature::Point

Extended by:
Type
Includes:
Geometry
Included in:
Cartesian::PointImpl, Geographic::ProjectedPointImpl, Geographic::SphericalPointImpl
Defined in:
lib/rgeo/feature/point.rb

Overview

SFS 1.1 Description

A Point is a 0-dimensional geometric object and represents a single location in coordinate space. A Point has an x-coordinate value and a y-coordinate value.

The boundary of a Point is the empty set.

Notes

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

Some libraries, such as GEOS, support “empty” points. Such objects might be returned as, for example, the centroid of an empty MultiPolygon. The SFS does not clearly define or even acknowledge the existence of such a type, so RGeo will currently generally replace them with empty GeometryCollection objects. Therefore, currently, every RGeo Point object represents an actual location with real coordinates.

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

#mObject

Returns the m-coordinate for this Point as a floating-point scalar value.

This method may not be available if the point’s factory does not support M coordinates.



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

def m
  raise Error::UnsupportedOperation, "Method Point#m not defined."
end

#xObject

SFS 1.1 Description

The x-coordinate value for this Point.

Notes

Returns a floating-point scalar value.



47
48
49
# File 'lib/rgeo/feature/point.rb', line 47

def x
  raise Error::UnsupportedOperation, "Method Point#x not defined."
end

#yObject

SFS 1.1 Description

The y-coordinate value for this Point.

Notes

Returns a floating-point scalar value.



59
60
61
# File 'lib/rgeo/feature/point.rb', line 59

def y
  raise Error::UnsupportedOperation, "Method Point#y not defined."
end

#zObject

Returns the z-coordinate for this Point as a floating-point scalar value.

This method may not be available if the point’s factory does not support Z coordinates.



69
70
71
# File 'lib/rgeo/feature/point.rb', line 69

def z
  raise Error::UnsupportedOperation, "Method Point#z not defined."
end