circularString
Creates a CircularString geometry from an array of points.
Circular string is a sequence of connected circular arcs, where circular arc is defined by 3 points:
- start point,
- some point on the arc,
- end point.
Circular string must have at least 3 points (one circular arc), each consecutive arc adds 2 points (arc start points is the end point from the previous arc), so the total number of points must be odd. Empty circular strings with 0 points are allowed.
Type Parameters
-
P
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
pts | Position[] | CircularString coordinates | |
options? | object | Optional geometry options | |
options.id? | number | string | Optional identifier to be assigned to the geometry instance. | |
options.properties? | P | Optional data to be assigned to the geometry instance. | |
options.layout? | 'XY' | 'XYZ' | 'XYZM' | 'XYM' | 'XYZM' | Coordinate layout for interpreting GeoJSON coordinates. Defines how to interpret the coordinates of input geometries. This does not force the dimension of the resulting geometries - the actual geometry dimension will be determined from the parsed data. Use this to:
|
Returns
CircularString<P>
A new CircularString geometry
Throws
InvalidGeoJSONErrorif total number of points is even or equal to 1