tileshrink
tileshrink copied to clipboard
Quality of resulting MBTiles - Metadata tabla is removed
Hi,
I'm testing tileshrink to see if I can reduce the size of my current MBTiles, but my question is, would I be left with lines/polygons that are of lower quality? I mean, would they be changed significantly?
I'm not sure until what extent the simplification/reduction would be performed.
I'm about to test it, and maybe I don't realize about the results (which will be perfect if the size of the MBTiles are reduced).
I did la few tests and my conclusions is that this library is good enough. It does what it prays. However, there is one issue it appear after using it to the MBTiles I applied it, which is basically that the metadata table is deleted from the shrinked file.
While it seems to be ok, for example in CartoSDK, it is not fine for Mapsforge. It reads the metadata table to know what kind of tiles are stored in the MBTiles file.
After looking in the code, I don't see any reference to the metadata table. So it wasn't removed in purpose, but by mistake. To shrink the MBTiles, a new file is created, and while doing so, the metadata table doesn't seem to be copied.
Aside from this, and as I said before, it works nicely! Just one suggestion, it'll be nice to allow adding a POLY file as input, so it could remove the tiles that are outside the POLY file. Reducing even more (potentially 20-50%, depending on the case) the size of the shrinked file.
Aloha @carlos-mg89 - sorry for missing your first message and thanks for your profound feedback and kudos! I'm happy to see this little gem beeing used for a product I see a future in ;)
The polygon cutout is a neat idea - you just motivated me to bring some breath into this project!
I'm glad you found my suggestion interesting :)
Looking forward to see that polygon cut improvement as well! If you need testers for that, I'd be more than happy to do so when the time comes.