open-vector-tile - v1.8.0

    Class MapboxVectorFeature

    Mapbox Vector Feature types are all bundled in one class to make it easier to read. Primarily contains an id, properties, and geometry. The now deprecated S2 model extends this class to include indices and tessellation data.

    Index

    Constructors

    • Parameters

      • pbf: PbfReader

        the pbf protocol we are reading from

      • end: number

        the position to stop at

      • isS2: boolean

        whether the layer is a deprecated S2 layer or Mapbox layer.

      • extent: number

        the extent of the vector tile

      • version: number

        the version of the vector tile. S2 is 5, Mapbox is 1

      • keys: string[]

        the keys in the vector layer to pull from

      • values: Value[]

        the values in the vector layer to pull from

      Returns MapboxVectorFeature

    Accessors

    • get hasMValues(): boolean

      Returns boolean

      • MapboxVectorTile's do not support m-values so we return false

    Methods

    • Add tessellation data to the geometry

      Parameters

      • geometry: number[]

        the geometry to add the tessellation data to

      • multiplier: number

        the multiplier to apply the extent shift

      Returns void

    • Returns BBox | BBox3D

      • a default bbox. Since no bbox is present, the default is [0, 0, 0, 0] also MapboxVectorTile's do not support 3D, so we only return a 2D bbox
    • Returns boolean

      • true if the type of the feature is lines
    • Returns boolean

      • true if the type of the feature is lines 3D
    • Returns boolean

      • true if the type of the feature is points
    • Returns boolean

      • true if the type of the feature is points 3D
    • Returns boolean

      • true if the type of the feature is polygons
    • Returns boolean

      • true if the type of the feature is polygons 3D
    • Returns [geometry: number[], indices: number[]]

      • [flattened geometry & tesslation if applicable, indices]
    • Returns Point[]

      • regardless of the type, we return a flattend point array
    • Returns number[]

      • an array of indices for the geometry
    MMNEPVFCICPMFPCPTTAAATR