Loading TOC...

MarkLogic 12 EA 1 Product Documentation
geo:linestring

geo:linestring(
   $linestring as node()
) as cts:linestring

Summary

Create a cts:linestring value from a node representing a linestring in one of the supported markup vocabularies, such as GML or KML.

Parameters
linestring A node representing a linestring.

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";

geo:linestring(
   <kml:LineString id="ID">
     <kml:coordinates>-110.45,45.256  -109.48,46.46  -109.86,43.84</kml:coordinates>
   </kml:LineString>)
  

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