LineString

@Serializable
@SerialName(value = "LineString")
class LineString(val xy: DoubleArray, val z: DoubleArray? = null) : CachedGeometry

A polyline / polygon ring stored as flat primitive arrays rather than one Point object per vertex — dense WFS/OSM geometry is mostly thousands of vertices per ring, and the object-per- vertex graph was the dominant decode-time allocation (the GC-pressure source). xy is interleaved [lon0, lat0, lon1, lat1, …] in degrees (size 2 * vertexCount); z is the per-vertex altitude in meters parallel to the vertices, or null for a 2D ring (clamp to ground). The closing vertex may or may not be present.

Constructors

Link copied to clipboard
constructor(xy: DoubleArray, z: DoubleArray? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

True when the ring carries altitudes (3D); false ⇒ clamp to ground.

Link copied to clipboard
val size: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Envelope-center (longitude, latitude) of this geometry — a deterministic representative point. Used to assign a feature to a single tile (the one containing its center), so a geometry that straddles a tile boundary renders in exactly one tile instead of every tile its envelope touches.

Link copied to clipboard
fun xAt(i: Int): Double
Link copied to clipboard
fun yAt(i: Int): Double
Link copied to clipboard
fun zAt(i: Int): Double?