Loading TOC...

MarkLogic Server 11.0 Product Documentation
geojson functions (GeoJSON)

The GeoJSON module provides support for geospatial queries using GeoJSON.

To use the GeoJSON in your JavaScript code, include a require statement similar to the following in your code:

const geojson = require('/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.complexPolygon Create a cts:complex-polygon value from a GeoJSON "Polygon" type geometry object.
geojson.geospatialQuery Returns a cts:query matching points within given regions.
geojson.geospatialQueryFromNodes Returns a cts:query matching points within given regions.
geojson.interiorPolygon 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.multiLinestring Create a set of cts:linestring values from a GeoJSON "MultiLineString" type geometry object.
geojson.multiPoint Create a set of cts:point values from a GeoJSON "MultiPoint" type geometry object.
geojson.parseGeojson 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.toGeojson Convert cts:region values into GeoJSON object nodes.