Loading TOC...

geojson:linestring

geojson:linestring(
   $linestring as object-node()
) as cts:linestring

Summary

Create a cts:linestring value from a GeoJSON "LineString" type geometry object.

Parameters
linestring A GeoJSON LineString node.

Example

  xquery version "1.0-ml";
  import module namespace geojson = "http://marklogic.com/geospatial/geojson"
         at "/MarkLogic/geospatial/geojson.xqy";

  geojson:linestring(
    object-node { 
      "type": "LineString",
      "coordinates": array-node { array-node {100.0, 0.0}, array-node {101.0, 1.0} }
    }
  )
  

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