geotiff2pmtiles converts Cloud Optimized GeoTIFF (COG) files into PMTiles archives - single-file tile stores that can be served from any static file host via HTTP range requests, without a tile server.
I built geotiff2pmtiles after the standard Python tooling failed to process the 116 GB ESA WorldCover dataset - it ran for over a week without finishing and required 512 GB of swap space. geotiff2pmtiles processes the same dataset in under 16 hours with bounded memory usage.
The tool handles multiple projections (EPSG:4326, EPSG:3857, Swiss LV95), input formats (COG, TIFF+TFW), data types (8/16-bit, float), output encodings (JPEG, PNG, WebP, Terrarium), and resampling methods (bicubic, bilinear, Lanczos-3, nearest-neighbor, mode). It auto-detects satellite datasets like Sentinel-2 and PlanetScope to configure band ordering and rescaling automatically.
The project also includes pmtransform, a companion tool for re-encoding, resampling, or filling empty tiles in existing PMTiles archives.
geotiff2pmtiles supports Linux and macOS (amd64/arm64). Windows is not supported due to the use of memory-mapped I/O (mmap).
Sample Output#
The ESA WorldCover 2021 land cover classification, processed with geotiff2pmtiles from 2,651 GeoTIFF files into a single PMTiles archive:
Open the land cover map in full screen
Blog Posts#
- geotiff2pmtiles: A Fast, Memory-Efficient GeoTIFF to PMTiles Converter in Pure Go - architecture, optimizations, and benchmarks
- Processing the ESA Worldcover 2021 Dataset for the Web - using geotiff2pmtiles to convert the full ESA WorldCover dataset
Source Code#
The project is open source: pspoerri/geotiff2pmtiles on GitHub.
Pre-built binaries for Linux and macOS (amd64/arm64) are available on the releases page.