s2-pmtiles - v1.1.2
    Preparing search index...

    Class S2PMTilesWriter

    Write a PMTiles file.

    Index

    Constructors

    Properties

    compression: Compression = Compression.Gzip

    the compression algorithm

    type: TileType

    the tile type

    writer: Writer

    the writer to append to

    Methods

    • Finish writing by building the header with root and leaf directories

      Parameters

      • metadata: Metadata

        the metadata to store

      Returns Promise<void>

    • Write a tile to the PMTiles file given its tile ID.

      Parameters

      • tileID: number

        the tile ID

      • data: Uint8Array

        the tile data

      • Optionalface: Face

        If it exists, then we are storing S2 data

      Returns Promise<void>

    • Write a tile to the PMTiles file given its (face, zoom, x, y) coordinates.

      Parameters

      • face: Face

        the Open S2 projection face

      • zoom: number

        the zoom level

      • x: number

        the tile X coordinate

      • y: number

        the tile Y coordinate

      • data: Uint8Array

        the tile data to store

      Returns Promise<void>

    • Write a tile to the PMTiles file given its (z, x, y) coordinates.

      Parameters

      • zoom: number

        the zoom level

      • x: number

        the tile X coordinate

      • y: number

        the tile Y coordinate

      • data: Uint8Array

        the tile data to store

      Returns Promise<void>