What does HackerNews think of PMTiles?
Cloud-optimized + compressed single-file tile archives for vector and raster maps
https://github.com/protomaps/PMTiles
https://github.com/protomaps/PMTiles/blob/main/js/examples/m...
There’s a python utility to convert mbtiles to pmtiles, but I’m also planning to add native pmtiles output to planetiler soon [2].
* like MBTiles it's agnostic to what individual tiles are. You can store vector data as SVG, Protobuf, raster PNGs, JPGs or even raw digital elevation models.
* It's not backwards compatible in the same way Cloud Optimized GeoTIFF is.
* It has a recursive index structure to avoid needing to load in huge indexes at once for large datasets (hundreds of millions of tiles).
* It is designed for remote HTTP range reads. If your application can instead directly access a filesytem, like on a mobile phone, MBTiles, which uses SQLite, is a more established solution.
The specification is open source on GitHub https://github.com/protomaps/PMTiles and is still evolving in response to user needs. I've created direct client support for Leaflet and MapLibre, and plan to work on OpenLayers next.
Doing S3 put requests for 260M files every week would cost around $1300 USD/week which was too much for our budget
> or in ZIP format?
We looked at zip's but due to the way the header (well central file directory) was laid out it mean that finding a specific file inside the zip would require the system to download most of the CFD.
The zip CFD is basically a list of header entries where they vary in size of 30 bytes + file_name length, to find a specific file you have to iterate the CFD until you find the file you want.
assuming you have a smallish archive (~1 million files) the CFD for the zip would be somewhere in the order of 50MB+ (depending on filename length)
Using a hash index you know exactly where in the index you need to look for the header entry, so you can use a range request to load the header entry
offset = hash(file_name) % slot_count
Another file format which is gaining popularity recently is PMTiles[1] which uses tree index, however it is specifically for tiled geospatial data.