MarkLogic 9 Product Documentation
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

xquery version "1.0-ml";
import module namespace geo = "http://marklogic.com/geospatial"
       at "/MarkLogic/geospatial/geospatial.xqy";
declare namespace kml= "http://earth.google.com/kml/2.0";

geo:box(
   <kml:LatLongBox>
     <kml:north>30</kml:north>
     <kml:south>12.5</kml:south>
     <kml:east>-122.24</kml:east>
     <kml:west>-127.24</kml:west>
   </kml:LatLongBox>)
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy