PMTile for small maps #63
Replies: 2 comments
-
The purpose of the fixed size header is to minimize the total # of HTTP requests (I/O operations). Without it, you would need to first query the first few bytes of the file to then determine the length of the header; each extra request can cost ~200 ms with typical latency between a user's web browser and a storage provider. The overall goal of PMTiles is to fulfill any tile request with at most two requests of overhead (1 fixed size request + possibly one leaf directory). The 512kb size as-is was left that way to simply the design overall when I wrote it last year, before I had finalized a method of compression that works across platforms. The upcoming revision to the spec reduces this from 512kb to 16kb (97% smaller), which should have a significant effect on latency. this 16kb fixed size header also matches how Cloud Optimized GeoTIFF works : see LAYOUT=IFDS_BEFORE_DATA. |
Beta Was this translation helpful? Give feedback.
-
Hi, You can now try the new converter to the v3 format at https://github.com/protomaps/go-pmtiles . This has no minimum size other than a 127-byte header. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am interested in storing vector maps for small area and I am considering the PMTile format.
Right now, because of the fixed size header, a PMTile file is always bigger than 512kb. For large map, this is not an issue but for a map with only a few tiles, it doesn't make sense.
What are the benefits of a fixed size header and why not having a dynamic size header as an option ?
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions