Loading TOC...

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

var 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.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.