
geo.linestringReverse( linestring as cts.linestring ) as cts.linestring
Construct a linestring with the vertices in reverse order.
| Parameters | |
|---|---|
| linestring | The linestring to be reversed. |
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.