
geo.polygonToLinestring( region as cts.region ) as Sequence
Construct a linestring from the vertices of a polygon, or construct a sequence of linestrings from the outer and inner polygons of a complex polygon.
| Parameters | |
|---|---|
| region | A cts.polygon or cts.complexPolygon from which to generate a linestring or linestrings. |
The vertex that closes the loop is excluded from the result linestring(s).
An error is thrown if any of the input values is not a polygon or complex polygon.
The return Sequence contains cts.linestring values.
const geo = require("/MarkLogic/geospatial/geospatial");
geo.polygonToLinestring(
cts.polygon([
cts.point(1,1),cts.point(2,2),
cts.point(3,3),cts.point(1,1)
])
)
// A Sequence containing a cts.linestring