LineString

@Serializable(with = LineStringSerializer::class)
data class LineString @JvmOverloads constructor(val coordinates: List<Position>, val bbox: BoundingBox? = null) : SingleGeometry, LineStringGeometry(source)

A LineString geometry represents a curve in coordinate space with two or more Position objects.

See RFC 7946 Section 3.1.4 for the full specification.

See also

Throws

if the coordinates contain fewer than two Position objects

Constructors

Link copied to clipboard
constructor(coordinates: List<Position>, bbox: BoundingBox? = null)
constructor(vararg coordinates: Position, bbox: BoundingBox? = null)

Create a LineString by a number of Position objects.

constructor(vararg points: Point, bbox: BoundingBox? = null)

Create a LineString by the Position objects of a number of Point objects.

constructor(coordinates: Array<DoubleArray>, bbox: BoundingBox? = null)

Create a LineString by an array of DoubleArray objects that each represent a Position.

Types

Link copied to clipboard
object Companion

Factory methods for creating and serializing LineString objects.

Properties

Link copied to clipboard
open override val bbox: BoundingBox?

The BoundingBox of this LineString.

Link copied to clipboard