File size: 2,231 Bytes
cd6720a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/** classifies an array of rings into polygons with outer rings and holes
 * @param {Point[][]} rings
 */
export function classifyRings(rings: Point[][]): Point[][][];
/** @import Pbf from 'pbf' */
/** @import {Feature} from 'geojson' */
export class VectorTileFeature {
    /**
     * @param {Pbf} pbf
     * @param {number} end
     * @param {number} extent
     * @param {string[]} keys
     * @param {(number | string | boolean)[]} values
     */
    constructor(pbf: Pbf, end: number, extent: number, keys: string[], values: (number | string | boolean)[]);
    /** @type {Record<string, number | string | boolean>} */
    properties: Record<string, number | string | boolean>;
    extent: number;
    /** @type {0 | 1 | 2 | 3} */
    type: 0 | 1 | 2 | 3;
    /** @type {number | undefined} */
    id: number | undefined;
    /** @private */
    private _pbf;
    /** @private */
    private _geometry;
    /** @private */
    private _keys;
    /** @private */
    private _values;
    loadGeometry(): Point[][];
    bbox(): number[];
    /**
     * @param {number} x
     * @param {number} y
     * @param {number} z
     * @return {Feature}
     */
    toGeoJSON(x: number, y: number, z: number): Feature;
}
export namespace VectorTileFeature {
    let types: ["Unknown", "Point", "LineString", "Polygon"];
}
export class VectorTileLayer {
    /**
     * @param {Pbf} pbf
     * @param {number} [end]
     */
    constructor(pbf: Pbf, end?: number);
    version: number;
    name: string;
    extent: number;
    length: number;
    /** @private */
    private _pbf;
    /** @private
     * @type {string[]} */
    private _keys;
    /** @private
     * @type {(number | string | boolean)[]} */
    private _values;
    /** @private
     * @type {number[]} */
    private _features;
    /** return feature `i` from this layer as a `VectorTileFeature`
     * @param {number} i
     */
    feature(i: number): VectorTileFeature;
}
export class VectorTile {
    /**
     * @param {Pbf} pbf
     * @param {number} [end]
     */
    constructor(pbf: Pbf, end?: number);
    layers: Record<string, VectorTileLayer>;
}
import Point from '@mapbox/point-geometry';
import type { Feature } from 'geojson';
import type Pbf from 'pbf';