Loading TOC...

geojson functions (GeoJSON)

The GeoJSON module provides support for geospatial queries using GeoJSON.

To use the GeoJSON module as part of your own XQuery module, include the following line in your XQuery prolog:

import module namespace geojson = "http://marklogic.com/geospatial/geojson" at "/MarkLogic/geospatial/geojson.xqy";

The library namespace prefix geojson is not predefined in the server.

13 functions
Function name Description
geojson:box Create a cts:box value from GeoJSON bbox property.
geojson:circle Create a cts:circle value from a radius and a GeoJSON "Point" type geometry object.
geojson:complex-polygon Create a cts:complex-polygon value from a GeoJSON "Polygon" type geometry object.
geojson:geospatial-query Returns a cts:query matching points within given regions.
geojson:geospatial-query-from-nodes Returns a cts:query matching points within given regions.
geojson:interior-polygon Create a sequence of cts:polygon values from a GeoJSON "Polygon" type geometry object.
geojson:linestring Create a cts:linestring value from a GeoJSON "LineString" type geometry object.
geojson:multi-linestring Create a set of cts:linestring values from a GeoJSON "MultiLineString" type geometry object.
geojson:multi-point Create a set of cts:point values from a GeoJSON "MultiPoint" type geometry object.
geojson:parse-geojson Convert GeoJSON object nodes into cts:region values.
geojson:point Create a cts:point value from a GeoJSON "Point" type geometry object.
geojson:polygon Create a cts:polygon value from a GeoJSON "Polygon" type geometry object or a sequence of GeoJSON "Point" type geometry objects.
geojson:to-geojson Convert cts:region values into GeoJSON object nodes.