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

Support gzip for tile data #95

Open
jaakla opened this issue Dec 20, 2017 · 2 comments
Open

Support gzip for tile data #95

jaakla opened this issue Dec 20, 2017 · 2 comments
Assignees

Comments

@jaakla
Copy link

jaakla commented Dec 20, 2017

For example tippecanoe exports tiles to directory as uncompressed pbf, but normally (like for mb studio) you need gzipped pbf, otherwise mb studio rejects it. The mbtiles metadata unfortunately does not specify tile data compression, so you kind of need to know whether "pbf" means plain or gzipped pbf. It has no much point for png or jpg as these are already compressed, but for pbf it makes a lot of sense - 50 and more % reduction.

So if you use mb-util to convert folder with pbf tiles to mbtiles the resulting mbtiles is big and just does not work for some targets. So I suggest to add flag -gzip to the tool to compress each tile data in the 'images' table. As a workaround manual compression of tiles before running mb-util (something like gzip *.pbf; mv *.pbf.gz *.pbf in each folder) is also an option, but with larger tilesets (I have biggest ones with ~100M tiles) it is kind of tedious.

jaakla pushed a commit to jaakla/mbutil that referenced this issue Dec 20, 2017
@jaakla
Copy link
Author

jaakla commented Dec 20, 2017

Submitted PR #96 with possible fix. Sorry, no test for it.

@e-n-f
Copy link
Contributor

e-n-f commented Dec 20, 2017

Tippecanoe should export compressed PBFs to directories unless you use --no-tile-compression, unless I got something wrong. (I'll check and make sure.) But thanks for the PR to manually add compression!

For symmetry, would you mind adding a --gunzip option to turn a compressed tileset into an uncompressed one?

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

No branches or pull requests

2 participants