Loading TOC...

MarkLogic Server 11.0 Product Documentation
geojson.point

geojson.point(
   point as objectNode()
) as cts.point

Summary

Create a cts:point value from a GeoJSON "Point" type geometry object.

Parameters
point A GeoJSON Point node.

Usage Notes

The GeoJSON Point node includes additional information that is not retained in the cts:point value. In particular, the altitude part of the point value will be dropped. Therefore two GeoJSON points at the same latitude and longitude with different altitude will nevertheless have equal cts:point values.

Example

const geojson = require('/MarkLogic/geospatial/geojson.xqy');
geojson.point(
  {type: 'Point', coordinates: [100.0,0.0]}
);
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.