the writer to append to
the maximum zoom level to write to
the compression algorithm to use for internal data like the
Readonly
compressionthe compression algorithm to use for internal data like the
Readonly
maxzoomthe maximum zoom level to write to
Readonly
writerthe writer to append to
Finish writing by building the header with root and leaf directories
the metadata to store
Optional
tileCompression: Compressionthe compression algorithm that was used on the tiles [Default: None]
Inserts a tile into the S2Tiles store.
the Open S2 projection face
the zoom level
the tile X coordinate
the tile Y coordinate
the tile data
Write a tile to the S2Tiles file given its (face, zoom, x, y) coordinates.
the Open S2 projection face
the zoom level
the tile X coordinate
the tile Y coordinate
the tile data to store
Write a tile to the S2Tiles file given its (face, zoom, x, y) coordinates.
the Open S2 projection face
the zoom level
the tile X coordinate
the tile Y coordinate
the tile data to store
Write a tile to the S2Tiles file given its (z, x, y) coordinates.
the zoom level
the tile X coordinate
the tile Y coordinate
the tile data to store
S2 Tiles Writer
Description
An S2 Tile Writer to store tile and metadata in a cloud optimized format. Similar to PMTiles but simplified to have as few features as possible.
Reads either a Web Mercator tile or an S2 tile to the folder location given its (zoom, x, y) or (face, zoom, x, y) coordinates.
Writes data via the S2Tiles specification.
Usage
Browser Compatible
Node/Deno/Bun using the filesystem
Links