Loading TOC...

MarkLogic 10 Product Documentation
geo:complex-polygon

geo:complex-polygon(
   $complex-polygon as node()
) as cts:complex-polygon

Summary

Create a cts:complex-polygon value from a node representing a complex polygon in one of the supported markup vocabularies, such as KML, GML, or GeoJSON. The complex polygon represents the combination of the exterior polygon and interior polygons in their representation.

Parameters
complex-polygon A node representing a complex polygon.

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:complex-polygon(
  <kml:Polygon>
    <kml:outerBoundaryIs><kml:LinearRing><kml:coordinates>
    -127.24,12.5 -127.8,15.25 -126.1,13.45 -127.24,12.5
    </kml:coordinates></kml:LinearRing></kml:outerBoundaryIs>
    <kml:innerBoundaryIs><kml:LinearRing><kml:coordinates>
    -127,13 127,-14 126,-14 127,-13
    </kml:coordinates></kml:LinearRing></kml:innerBoundaryIs>
  </kml:Polygon>)
  

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