Loading TOC...

geo.linestringReverse

geo.linestringReverse(
   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

const geo = require("/MarkLogic/geospatial/geospatial");

geo.linestringReverse(
  cts.linestring([
    cts.point(1,1),cts.point(2,2),
    cts.point(3,3),cts.point(1,1)
  ])
)

// A cts.linestring equivalent to the following WKT:
//  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.