Loading TOC...

MarkLogic Server 11.0 Product Documentation
geojson:box

geojson:box(
   $box as object-node()
) as cts:box

Summary

Create a cts:box value from GeoJSON bbox property.

Parameters
box A GeoJSON node that has a bbox property.

Example

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

  geojson:box(object-node { 
    "type": "Feature",
    "bbox": array-node {-180.0, -90.0, 180.0, 90.0},
    "geometry": object-node {
      "type": "Polygon",
      "coordinates": array-node { array-node {
        array-node {-180.0, 10.0}, 
        array-node {20.0, 90.0}, 
        array-node {180.0, -5.0},
        array-node {-30.0, -90.0}
      }}
    }
  })
  

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