MvtFeature

class MvtFeature(val layerName: String, val extent: Int, val geometry: MvtGeometry, val attributes: Map<String, Any?>, val id: Long)

One decoded feature from a Mapbox Vector Tile layer.

Drop-in replacement for no.ecc.vectortile.VectorTileDecoder.Feature. The property names match that type's Java getters exactly (getLayerName ->layerName, getExtent ->extent, and so on) so the ~46 call sites that read these off a raw feature did not change when the decoder was swapped.

Two shape differences from the type it replaces, both deliberate:

  • geometry is non-null. The old decoder also never returned null (it substituted an empty geometry collection), but Java platform types forced every Kotlin caller to null-check it anyway. MvtEmptyGeometry fills the same role with an honest type.

  • attributes is Map<String, Any?>. Values genuinely can be null -- an MVT Value message that sets none of its seven variants decodes to null, and the previous decoder stored that.

Attribute maps are already pruned to the keys some consumer declared (see MvtReader.decode); a feature whose tags were all pruned carries emptyMap.

Constructors

Link copied to clipboard
constructor(layerName: String, extent: Int, geometry: MvtGeometry, attributes: Map<String, Any?>, id: Long)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String

Identity equality, matching the type this replaces.