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

const 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]
      ]]
  }}
)
  

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