MarkLogic Server 11.0 Product Documentation
geokml:point

geokml:point(
   $point as element()
) as cts:point

Summary

Create a cts:point value from a KML Point or Location element.

Parameters
point A Point or Location element.

Usage Notes

The KML Point and Location elements include additional information that is not retained in the cts:point value. In particular, the elevation part of the point value will be dropped. Therefore two KML points at the same latitude and longitude with different elevations will nevertheless have equal cts:point values.

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:point(
    <kml:Point>
      <kml:coordinates>-127.24,12.5,10.0</kml:coordinates>
    </kml:Point>)
  ,
  geokml:point(
    <kml:Location>
      <kml:latitude>12.5</kml:latitude>
      <kml:longitude>-127.24</kml:longitude>
      <kml:altitude>10.0</kml:altitude>
    </kml:Location>)
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy