s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
35 lines • 1.43 kB
TypeScript
import type { Metadata } from 's2-tilejson';
import type { TileWriter } from '.';
/** This is a filesystem Tile writer that organizes data via folders. */
export declare class FileTileWriter implements TileWriter {
readonly path: string;
readonly fileType: string;
/**
* @param path - the location to write the data
* @param fileType - the file ending to write
*/
constructor(path: string, fileType?: string);
/**
* Write a tile to the PMTiles file given its (z, x, y) coordinates.
* @param zoom - the zoom level
* @param x - the tile X coordinate
* @param y - the tile Y coordinate
* @param data - the tile data to store
*/
writeTileWM(zoom: number, x: number, y: number, data: Uint8Array): Promise<void>;
/**
* Write a tile to the PMTiles file given its (face, zoom, x, y) coordinates.
* @param face - the Open S2 projection face
* @param zoom - the zoom level
* @param x - the tile X coordinate
* @param y - the tile Y coordinate
* @param data - the tile data to store
*/
writeTileS2(face: number, zoom: number, x: number, y: number, data: Uint8Array): Promise<void>;
/**
* Finish writing by building the header with root and leaf directories.
* @param metadata - the metadata about all the tiles to store
*/
commit(metadata: Metadata): Promise<void>;
}
//# sourceMappingURL=tile.d.ts.map