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

Would it be possible to create uncompressed .pbf from an .mbtiles #79

Closed
nouryf opened this issue Jan 11, 2017 · 5 comments
Closed

Would it be possible to create uncompressed .pbf from an .mbtiles #79

nouryf opened this issue Jan 11, 2017 · 5 comments

Comments

@nouryf
Copy link

nouryf commented Jan 11, 2017

Hi,

When extracting the tiles as .pbf from an .mbtiles these seems to be ziped. Before being able to consume them from a client using .js they need to be uncompressed first. Would it be possible to have an option to produce uncompressed .pbf ? This way the process of creating uncompressed .pbf can be done in one step.

Thanks

@nouryf nouryf changed the title Would it be possible to created uncompressed .pbf Would it be possible to create uncompressed .pbf from an .mbtiles Jan 11, 2017
@ImreSamu
Copy link

Before being able to consume them from a client using .js they need to be uncompressed first.

check the: https://github.com/mapbox/awesome-vector-tiles you can find lot of JavaScript tools ...

@nouryf
Copy link
Author

nouryf commented Jan 24, 2017

Thanks. I can unzip the pbf files just ok but i was wondering if it's possible to produce/extract uncompressed .pbf directly when using mbutil. This way the process of having ready to consume .pbf will be simply one step: mbutil and not two steps: mbutil then looping through the folders and sub-folders to uncompress the .pbf one by one.

@sgillies
Copy link
Contributor

@nouryf this project is not actively developed and we are not taking requests for new features. We will, however, gladly accept pull requests with tested code.

@anilkunchalaece
Copy link

anilkunchalaece commented Apr 30, 2019

pull request / 109
will solve the problem , i think

@marjanmo
Copy link

marjanmo commented Oct 20, 2023

Just a tip for those who are stuck "looping through the folders and sub-folders to uncompress the .pbf one by one.". Mb-util actually exports gzip compressed files, but the names (.pbf) do not suggest that. In order to actually decompress them, you have to rename them first into (.pbf.gz). So after the mb-util conversion, this is what did the trick for me to end up with the same output structure, only with actually decompressed pbf files:

cd output_dir
find . -name '*.pbf' -exec bash -c 'mv "$1" "${1}".gz' - '{}' \;
find . -name '*.gz' -exec bash -c 'gzip -d "$1"' - '{}' \;

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

5 participants