Skip to main content

compoundCurve

Creates a CompoundCurve geometry from an array of continuous segments.

Each segment can be either LineString or CircularString, they need to be connected - the first point of a segment is the same as the last point from the previous segment. Empty compound curves without any segments are allowed.

Type Parameters

  • P

Parameters

NameTypeDefaultDescription
geometries( LineString | CircularString )[]Array of compound curve segments
options?objectOptional geometry options
options.id?number | stringOptional identifier to be assigned to the geometry instance.
options.properties?POptional data to be assigned to the geometry instance.
options.consume?booleanfalseWhether to consume the input geometries - consumed geometries become detached, are no longer valid and should not be used.
When true the ownership of input geometries is passed to created collection geometry, no extra copies are made, but the input geometries can no longer be used on their own.
When false the clones of input geometries are used to create a collection geometry.

Returns

CompoundCurve<P>

A new CompoundCurve geometry

Throws

Examples