lineString
Creates a LineString geometry from an array of positions.
Line string must contain at least 2 positions. Empty line strings with 0 positions are allowed.
Type Parameters
-
P
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
pts | Position[] | LineString 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
LineString<P>
A new LineString geometry
Throws
InvalidGeoJSONErroron line with 1 position