Loading TOC...

geojson.box

geojson.box(
   $box as objectNode()
) as cts.box

Summary

Create a cts:box value from GeoJSON bbox property.

Parameters
$box A GeoJSON node that has a bbox property.

Example

var geojson = require('/MarkLogic/geospatial/geojson.xqy');

geojson.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]
      ]]
  }}
)
  

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy