Loading TOC...

geo.linestringConcat

geo.linestringConcat(
   $linestrings as cts.linestring[]
) as cts.linestring

Summary

Construct a linestring by concatenating the vertices of the input linestrings, in order.

Parameters
$linestrings The linestrings to be concatenated.

Usage Notes

If the last vertex of one input linestring is the first vertex of another linestring, that vertex is not duplicated.

See Also

Example

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

geo.linestringConcat([
  cts.linestring([cts.point(1,1),cts.point(2,2),cts.point(3,3)]),
  cts.linestring([cts.point(3,3),cts.point(4,4),cts.point(5,5)])
])

// A cts.linestring equivalent to the following WKT:
// LINESTRING(1 1,2 2,3 3,4 4,5 5)
  

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

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.