MarkLogic Server 11.0 Product Documentation
geojson:point

geojson:point(
   $point as object-node()
) 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

  xquery version "1.0-ml";
  import module namespace geojson = "http://marklogic.com/geospatial/geojson"
         at "/MarkLogic/geospatial/geojson.xqy";

  geojson:point(
    object-node { "type" : "Point", "coordinates" : array-node {100.00, 0.0} }
  )
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy