Home    |    Concepts   |   API   |   Samples
Concepts > Geometry > Shapes
Types of Shapes

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.


Point/Multipoint

 

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

Top

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:

startpoint - Takes a linestring and returns its first point.
endpoint - Takes a linestring and returns its last point.
pointn - Takes a linestring and an index to nth point and returns that point.
length - Takes a linestring and returns its length as a double-precision number.
numpoints - Takes a linestring and returns the number of points in its sequence as an integer.
isring - Takes a linestring and returns t (TRUE) if the linestring is a ring and f (FALSE) otherwise.
isclosed - Takes a linestring and returns t (TRUE) if the linestring is closed and f (FALSE) otherwise

Polygons/Multipolygons

Top

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:

area - Takes a polygon and returns its area as a double-precision number.
exteriorring - Takes a polygon and returns its exterior ring as a linestring.
numinteriorrings - Takes a polygon and returns the number of interior rings that it contains.
interiorringn - Takes a polygon and an index and returns the nth interior ring as a linestring.
centroid - Takes a polygon and returns a point that is the center of the polygon’s envelope.
pointonsurface - Takes a polygon and returns a point that is guaranteed to be on the surface of the polygon.

Send your comments to: Site Administrator | Terms of Use | PRIVACY | Copyright © ESRI.