-
-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PMTiles area download mechanism #2352
Comments
This is an interesting idea. Offline downloads of large areas are indeed horribly slow currently. Though there would be some complexities involved in converting from PMTiles to MBTiles for storage. |
That mapgl-tile-renderer tool could probably be used for small area exports. it exports mbtiles but I added pmtiles source support to it . you don't really need the rendering aspect, but if you are supplying a style with rasters the effect is pretty much the same. Does maplibre have a tool now to download images for offline use now? |
Can this be accomplished outside of the maplibre native codebase, and then just deliver the tile archive in a format MLN understands? |
@bdon Yes you can merge in a database that exists on the local filesystem.
|
During today's TSC meeting @JesseCrocker mentioned that he had to implement his own offline database due to the limitations of the built-in one. This idea from @wipfli was also discussed. I'll write some documentation about the current offline database implementation so we can get the ball rolling. Downloading an area, parsing it and writing it out to a SQLite database in the correct format should not be too complicated. I think it makes sense to re-use the current offline database, since despite its flaws it is widely in use. #3017 |
Is your feature request related to a problem? Please describe.
I'm always frustrated when downloading tiles for offline usage is slow.
Describe the solution you'd like
The PMTiles storage format orders tiles that are on a Hilbert curve in space linearly in memory. As a consequence, tiles that are close together can be downloaded in only a few range requests whereas with traditional zxy endpoints each tile has to be downloaded individually.
So, area downloads of tiles for offline usage are much more efficient with PMTiles than with zxy endpoints.
It could be interesting for offline apps to create a mechanism that downloads tiles from a PMTiles archive and stores them in the existing offline cache...
Describe alternatives you've considered
The current offline download mechanism is a viable existing alternative.
Additional context
Measurements of @bdon have shown that
pmtiles extract...
can be extremely fast...The text was updated successfully, but these errors were encountered: