Loading TOC...

MarkLogic 9 Product Documentation
geokml:complex-polygon

geokml:complex-polygon(
   $complex-polygon as element()
) as cts:complex-polygon

Summary

Create a cts:complex-polygon value from a KML Polygon element. The polygon returned represents the combination of the exterior polygon and the interior polygons.

Parameters
complex-polygon A Polygon element representing the complex polygon.

Example

  xquery version "1.0-ml";
  import module namespace geokml = "http://marklogic.com/geospatial/kml"
         at "/MarkLogic/geospatial/kml.xqy";
  declare namespace kml="http://www.opengis.net/kml/2.2";

  geokml: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.