gis-tools-ts - v0.6.0
    Preparing search index...

    Interface BuildGuide<V, G>

    A user defined guide on building the vector tiles

    interface BuildGuide<
        V extends MValue = Properties,
        G extends MValue = Properties,
    > {
        attribution?: Attributions;
        buildIndices?: boolean;
        description?: string;
        encoding?: Encoding;
        extension?: string;
        format: FormatOutput;
        gridSources?: Record<
            string,
            FeatureIterator<unknown, G, G, VectorGeometry<G>>,
        >;
        layerGuides: LayerGuide[];
        name: string;
        projection: Projection;
        rasterSources?: Record<
            string,
            FeatureIterator<unknown, RGBA, RGBA, VectorGeometry<RGBA>>,
        >;
        threads?: number;
        tileWriter: TileWriter;
        vectorSources?: Record<
            string,
            FeatureIterator<unknown, V, V, VectorGeometry<V>>,
        >;
        version?: string;
    }

    Type Parameters

    • V extends MValue = Properties
    • G extends MValue = Properties
    Index

    Properties

    attribution?: Attributions

    The attribution of the data. Store as { 'presentation name': 'href' }.

    buildIndices?: boolean

    Should the indices be built for polygon data for faster rendering (file cost increases). [Default: true]

    description?: string

    The description of the data

    encoding?: Encoding

    The encoding format. Can be either 'gz', 'br', 'zstd' or 'none'. [Default: 'none']

    extension?: string

    Specify the image type. e.g. 'pbf', 'png', 'jpg', 'webp', etc. [Default: 'pbf']

    format: FormatOutput

    The vector format if applicable helps define how the vector data is stored.

    • The more modern vector format is the 'open-s2' which supports things like m-values and 3D geometries.
    • The new vector format is the 'open-s2' which only supports 2D & 3D geometries, supports M-Values, properties and M-Values can have nested properties and/or arrays, and is decently fast to parse.
    • The basic vector format is the 'flat-open-s2' which only supports 2D geometries and works on older map engines like Mapbox-gl-js, is faster to parse and often lighter in size.
    • The older vector format is the 'mapbox' which is the legacy format used by Mapbox and slow to parse.
    • The raster format is used speciially for raster ONLY data. Ensures the data is stored as a raster [Default: 'open-s2']
    gridSources?: Record<string, FeatureIterator<unknown, G, G, VectorGeometry<G>>>

    The grid sources that will be conjoined into a single grid index for tile extraction

    layerGuides: LayerGuide[]

    The guides on how to build the various data See: LayerGuide

    name: string

    The name of the data

    projection: Projection

    What kind of output format should be used. Used for describing either S2 or WM projections. [Default: 'fzxy']

    rasterSources?: Record<
        string,
        FeatureIterator<unknown, RGBA, RGBA, VectorGeometry<RGBA>>,
    >

    The raster sources that will be conjoined into a single rgba pixel index for tile extraction

    threads?: number

    Set the number of threads to use. [Default: 1]

    tileWriter: TileWriter

    The data created will be stored in either a folder structure or a pmtiles file Folder structure is either '{face}/{zoom}/{x}/{y}.pbf' or '{zoom}/{x}/{y}.pbf'. PMTiles store all data in a single data file. See: TileWriter

    vectorSources?: Record<
        string,
        FeatureIterator<unknown, V, V, VectorGeometry<V>>,
    >

    The vector sources that the tile is built from and how the layers are to be stored. Created using { [sourceName: string]: FeatureIterator } See: FeatureIterator

    version?: string

    User defined versioning for their data