Replies: 2 comments 10 replies
-
PMTiles is not a zip archive and does not support in-place or transactional updates. I would recommend generating two PMTiles in clustered mode (the go-pmtiles and tippecanoe tools do this) and then using tools that perform RSync binary diffs to only send over a patch. I haven't investigated this deeply but it should be efficient in theory. Let me know what you learn. |
Beta Was this translation helpful? Give feedback.
-
Also interested in this! We are currently shipping two planet-wide pmtiles archives, and moving around the entire files with any frequency is a non-starter. I will look into the binary diff tools, but it would be great to have built-in support. |
Beta Was this translation helpful? Give feedback.
-
I have the following scenario currently, which I'm looking to improve, hopefully with PMTiles.
In order to have offline support in my app (which uses maplibre-gl-js and Capacitor) I'm downloading mbtiles to a folder of the device and serve tiles from there (reading it with a sqlite native support).
This works great and is very fast, but doesn't support incremental updates - i.e. if I want to update the mbtiles I'll need to update specific tiles in it, when we looked at this, we saw that the mbtiles file gets bigger and bigger and the
vaccum
opperation doesn't solve the problem.So our current solution is to generate and download the entire file every day.
This can work on our situation, which is only the country of Israel, which is small, but this doesn't scale.
Since PMTiles is a zip archive, I'm almost sure this can be done well without issues.
The problem is that I don't think the JS library supports writing single tiles (I only saw
getZxy
method).I'm still looking into what other solutions we have in general, but this direction seems promising I hope, assuming I don't need to load all the file into memory to do these operations.
Any feedback is welcome.
Beta Was this translation helpful? Give feedback.
All reactions