JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

GeoJson Geometry Functions

getArea

Calculates the area of a GeoJSON geometry object as a numeric value.

Parameters

Name Required Description
geometry Yes Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object.

getCentroid

Calculates the centroid of a GeoJSON geometry object or BoundingBox as a GeoJSON Point.

Parameters

Name Required Description
geometry Yes Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object or a BoundingBox array.

getFeatureAt

Returns a GeoJSON feature at a given distance along a GeoJSON LineString or MultiLineString.

The properties of the feature also include the rotation angle of the LineString/MultiLineString at the given distance.

Parameters

Name Required Description
geometry Yes Any GeoJSON LineString or MultiLineString.
distanceAlong Yes The distance along the GeoJSON LineString or MultiLineString at which to obtain the Feature.

getLength

Calculates the length of a GeoJSON geometry object as a numeric value.

Parameters

Name Required Description
geometry Yes Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object.

getLongest

Returns the longest GeoJSON LineString in a GeoJSON MultiLine.

Parameters

Name Required Description
geometry Yes Any GeoJSON MultiLineString.

getBoundingBox

Calculates the Bounding Box of a GeoJSON geometry object as a Bounding Box array.

Parameters

Name Required Description
geometry Yes Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object.