Skip to content
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

Quality of resulting MBTiles - Metadata tabla is removed #1

Open
carlos-mg89 opened this issue Oct 22, 2018 · 4 comments
Open

Quality of resulting MBTiles - Metadata tabla is removed #1

carlos-mg89 opened this issue Oct 22, 2018 · 4 comments

Comments

@carlos-mg89
Copy link

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).

@carlos-mg89
Copy link
Author

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.

@carlos-mg89 carlos-mg89 changed the title Quality of resulting MBTiles Quality of resulting MBTiles - Metadata tabla is removed Sep 26, 2019
@carlos-mg89
Copy link
Author

carlos-mg89 commented Sep 26, 2019

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.

@rastapasta
Copy link
Owner

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!

@carlos-mg89
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants