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

GeoJson Geospatial Operators

intersection

Finds the GeoJSON geometry that makes up the intersection of two other geometries.

Parameters

Name Required Description
geometry1 Yes Any GeoJSON geometry object.
geometry2 Yes Any GeoJSON geometry object.

Currently Implemented

At present this function is only implemented for the geometry types in the table below.

geometry2
Point MultiPoint LineString MultiLineString Polygon MultiPolygon BoundingBox
geometry1
Point - - - - - - -
MultiPoint - - - - - - -
LineString - - YES - - - -
MultiLineString - - - - - - -
Polygon - - - - - - -
MultiPolygon - - - - - - -
BoundingBox - - - - - - -

intersects

Determines whether two GeoJSON geometries intersect as a boolean.

Parameters

Name Required Description
geometry1 Yes Any GeoJSON geometry object.
geometry2 Yes Any GeoJSON geometry object.

Currently Implemented

At present this function is only implemented for the geometry types in the table below.

geometry2
Point MultiPoint LineString MultiLineString Polygon MultiPolygon BoundingBox
geometry1
Point - - - - - - -
MultiPoint - - - - - - -
LineString - - YES - - - -
MultiLineString - - - - - - -
Polygon - - - - YES - -
MultiPolygon - - - - - - -
BoundingBox - - - - - - YES

isContainedBy

Determines whether a GeoJSON geometry is contained by another GeoJson geometry as a boolean.

Parameters

Name Required Description
geometry Yes Any GeoJSON geometry object.
container Yes Any GeoJSON geometry object.

Currently Implemented

At present this function is only implemented for the geometry types in the table below.

container
Point MultiPoint LineString MultiLineString Polygon MultiPolygon BoundingBox
geometry
Point - - YES(ring) - YES - YES
MultiPoint - - - - - - -
LineString - - YES(ring) - - - -
MultiLineString - - - - - - -
Polygon - - - - YES - -
MultiPolygon - - - - - - -
BoundingBox - - - - - - -

slice

Slices a GeoJSON geometry into multiple geometries based on intersections with other geometries.

NOTE: In the case of the Point geometry, the point will first snap to the other geometry before slicing.

Parameters

Name Required Description
geometry Yes Any GeoJSON geometry object.
sliceBy Yes Any GeoJSON geometry object.

Currently Implemented

At present this function is only implemented for the geometry types in the table below.

sliceBy
Point MultiPoint LineString MultiLineString Polygon MultiPolygon BoundingBox
geometry
Point - - - - - - -
MultiPoint - - - - - - -
LineString YES - - - - - -
MultiLineString - - - - - - -
Polygon - - - - - - -
MultiPolygon - - - - - - -
BoundingBox - - - - - - -

snapTo

Snaps a point onto another geometry.

Parameters

Name Required Description
point Yes Any GeoJSON Point object.
geometry Yes Any GeoJSON geometry object.

Currently Implemented

At present this function is only implemented for the geometry types in the table below.

geometry
Point MultiPoint LineString MultiLineString Polygon MultiPolygon BoundingBox
Point - - YES YES - - -

rotate

returns a rotated GeoJson geometry.

Parameters

Name Required Description
geometry Yes Any GeoJSON geometry object.
origin Yes Any GeoJSON Point object around which to rotate the geometry
angle Yes The andle in radians to rotate the geometry