The KML module provides support for geospatial queries using KML markup.
To use the KML module as part of your own XQuery module, include the following line in your XQuery prolog:
import module namespace geokml = "http://marklogic.com/geospatial/kml"
at "/MarkLogic/geospatial/kml.xqy";
The library namespace prefix geokml
is not predefined
in the server.
Function name | Description |
---|---|
geokml:box | Create a cts:box value from a KML LatLongBox element. |
geokml:circle | Create a cts:circle value from a radius and KML Point or Location element. |
geokml:complex-polygon | Create a cts:complex-polygon value from a KML Polygon element. |
geokml:geospatial-query | Returns a cts:query matching points within given regions. |
geokml:geospatial-query-from-elements | Returns a cts:query matching points within given regions. |
geokml:interior-polygon | Create a sequence of cts:polygon values from a KML Polygon element. |
geokml:linestring | Create a cts:linestring value from a KML LineString element. |
geokml:parse-kml | Construct regions from KML elements. |
geokml:point | Create a cts:point value from a KML Point or Location element. |
geokml:polygon | Create a cts:polygon value from a KML polygon or a sequence of KML Point or Location elements. |
geokml:to-kml | Construct KML elements from cts:region values. |