Loading TOC...

MarkLogic 12 EA 2 Product Documentation
geo:linestring-reverse

geo:linestring-reverse(
   $linestring as cts:linestring
) as cts:linestring

Summary

Construct a linestring with the vertices in reverse order.

Parameters
linestring The linestring to be reversed.

See Also

Example

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

geo:linestring-reverse(
  cts:linestring(
    (cts:point(1,1), cts:point(2,2), cts:point(3,3))
  )
)

==> A cts:linestring similar to the following:
    cts:linestring("LINESTRING(3 3,2 2,1 1)")
  

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