Loading TOC...

MarkLogic Server 11.0 Product Documentation
geokml:parse-kml

geokml:parse-kml(
   $kml as element()*
) as cts:region*

Summary

Construct regions from KML elements.

Parameters
kml Zero or more XML elements conforming to the KML schema.

Example

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:parse-kml(
  <Polygon xmlns="http://www.opengis.net/kml/2.2">
    <extrude>0</extrude>
    <tessellate>0</tessellate>
    <altitudeMode>relativeToGround</altitudeMode>
    <outerBoundaryIs>
      <LinearRing>
        <coordinates>1.0,5.0 1.0,8.0 6.0,8.0 7.0,5.0 1.0,5.0 </coordinates>
      </LinearRing>
    </outerBoundaryIs>
  </Polygon>
)

==> A cts:polygon with the given coordinates.
  

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