MvtLineString

class MvtLineString(val coordinates: Array<MvtCoordinate>) : MvtGeometry

An open or closed run of coordinates.

MVT polygon rings use this same type. JTS modelled rings as a LinearRing subclass, but nothing in this codebase distinguished the two -- rings and lines are both consumed through coordinates. Ring closure is preserved exactly as decoded: the ClosePath command appends a duplicate of the first vertex, and the renderers strip that trailing duplicate themselves.

Constructors

Link copied to clipboard
constructor(coordinates: Array<MvtCoordinate>)

Properties

Link copied to clipboard
Link copied to clipboard
open override val envelopeInternal: MvtEnvelope

Cached like JTS cached its own; hit-testing calls this per feature on every tap.

Link copied to clipboard
open override val isEmpty: Boolean

True when this geometry carries no coordinates.

Link copied to clipboard
open val numGeometries: Int

1 for a single geometry, the child count for a multi-geometry, 0 for the empty one.

Link copied to clipboard

Functions

Link copied to clipboard

Mirrors Geometry.getGeometryN: returns this for single geometries.