geo.box

geo.box(
   box as Node
) as cts.box

Summary

Create a cts.box value from a node representing a box in one of the supported markup vocabularies, such as KML, GML, or GeoJSON.

Parameters
box A node representing a box.

Usage Notes

If you know the geospatial data format (GML, KML, etc.), it is more efficient to use the equivalent format-specific function.

See Also

Example

const geo = require('/MarkLogic/geospatial/geospatial');

geo.box(
  { type: 'Feature',
    bbox: [-180.0, -90.0, 180.0, 90.0],
    geometry: {
      type: 'Polygon',
      coordinates: [[
        [-180.0, 10.0], [20.0, 90.0], [180.0, -5.0], [-30.0, -90.0]
      ]]
  }}
)
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy