Several types of shapes exist and a number of properties and methods are common to all
these types. Each shape
reports its type, the spatial reference system it belongs to, and the
minimum bounding box it occupies in coordinate space. In addition, shapes
can be defined as nil, to hold an empty or NULL geometry. Shapes can also have
multiple parts to hold homogeneous geometry collections. For example,
a shape may contain several unconnected lines which represent an intermittent
stream.
A point is shape with a dimension of 0 that occupies a single
location in coordinate space. A point has a single x,y coordinate value. A point is always simple. Points have a NULL boundary and are often used to define features
such as oil wells, landmarks, and elevations.
A multipoint is a collection of points, and just like its elements it has a dimension of 0. A multipoint is
simple if none of its elements occupy the same coordinate space. The boundary of a multipoint is NULL. Multipoints define aerial broadcast patterns and incidents of a
disease outbreak.
Functions that operate solely on the point data type include:
xReturns a point data type's
x-coordinate value as a double-precision number
yReturns a point data type's
y-coordinate value as a double-precision number
zReturns a point data type's
z-coordinate value as a double-precision number
mReturns a point data type's
m-coordinate value as a double-precision number
Linestring/Multilinestring
|
|
A
linestring is shape that has a dimension of 1. It is called a simple line or linestring if it does not intersect itself. The endpoints (the boundary) of
a closed linestring occupy the same point in space. A linestring is a ring if it is both closed and simple. As well as the other properties inherited from the
superclass geometry, linestrings have length. Linestrings are often used to define linear features such as roads, rivers, and power lines.
The endpoints normally form the boundary of a linestring unless the linestring is closed, in which case the boundary is NULL. The interior of a linestring is the connected
path that lies between the endpoints, unless it is closed, in which case the interior is continuous.
A multilinestring is a collection of linestrings. Multilinestrings are simple if they only intersect at the endpoints of the linestring elements. Multilinestrings are nonsimple if the interiors of the
linestring elements intersect. The boundary of a multilinestring is the nonintersected endpoints of the linestring elements. The multilinestring is closed if all its
linestring elements are closed. The boundary of a multilinestring is NULL if all the endpoints of all the elements are intersected. In addition to the other properties inherited from the superclass geometry, multilinestrings have length.
Multilinestrings are used to define streams or road networks.
Functions that operate on linestrings include:
startpointTakes a linestring and returns its first point
endpointTakes a linestring and returns its last point
pointnTakes a linestring and an index to nth point and returns that point
lengthTakes a linestring and returns its length as a double-precision number
numpointsTakes a linestring and returns the number of points in its sequence as an integer
isringTakes a linestring and returns t (TRUE) if the linestring is a ring and f (FALSE) otherwise
isclosedTakes a linestring and returns t (TRUE) if the linestring is closed and f (FALSE) otherwise

A
polygon is a two-dimensional surface stored as a sequence of points defining its exterior bounding ring and 0 or more interior rings. Polygons by definition are
always simple. Most often they define parcels of land, water bodies, and other features that have a spatial extent.
The exterior and any interior rings define the boundary of a polygon, and the space enclosed between the rings defines the polygon's interior. The rings of a polygon can
intersect at a tangent point but never cross. In addition to the other properties inherited from the superclass geometry, polygons have area.
Functions that operate on polygons include:
areaTakes a polygon and returns its area as a double-precision number
exteriorringTakes a polygon and returns its exterior ring as a linestring
numinteriorringsTakes a polygon and returns the number of interior rings that it contains
interiorringnTakes a polygon and an index and returns the nth interior ring as a linestring
centroidTakes a polygon and returns a point that is the center of the polygon's envelope.
pointonsurfaceTakes a polygon and returns a point that is guaranteed to be on the surface of the polygon.
|