Skip to main content

Geometry

A Geometry is a description of a geographic object. For a more detailed information as well as live demo about how to use them, please visit Vector layer. For complete developer guide, please visit API Documentation page under BaseTypes section and Geometry section.

Collection

A Collection is exactly what it sounds like: A collection of different Geometries. These are stored in the local parameter components (which can be passed as a parameter to the constructor). As new geometries are added to the collection, they are NOT cloned. When removing geometries, they need to be specified by reference (ie you have to pass in the exact geometry to be removed).

Curve

A Curve is a MultiPoint, whose points are assumed to be connected. To this end, we provide a getLength function, which iterates through the points, summing the distances between them.

LinearRing

A Linear Ring is a special LineString which is closed. It closes itself automatically on every addPoint/removePoint by adding a copy of the first point as the last point. Also, as it is the first in the line family to close itself, a getArea function is defined to calculate the enclosed area of the linearRing.

LineString

A LineString is a Curve which, once two points have been added to it, can never be less than two points long.

MultiLineString

A MultiLineString is a geometry with multiple LineString components.

MultiPoint

MultiPoint is a collection of Points.

MultiPolygon

MultiPolygon is a geometry with multiple Polygon components.

Point

Point geometry class.

Polygon

Polygon is a collection of LinearRings.

Last updated November 23, 2021.