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

Feature request: Set zoom level range? #102

Open
bongobongo opened this issue Jul 15, 2018 · 4 comments
Open

Feature request: Set zoom level range? #102

bongobongo opened this issue Jul 15, 2018 · 4 comments

Comments

@bongobongo
Copy link

I would like to generate tiles only from zoom level 1 to 11
It would be very practical if it was possible to set two parameters for mbutil.
Something like:
zoom_level_start=1
zoom_level_en=11

This would make it possible to significantly reduce the time to generate the tiles.

Any chance to see this feature implemented?
If not, could somebody tell me what code changes that would have to be done to make it possible to set a zoom range.

@Wieschie
Copy link

while t:

This while loop pulls tiles one by one from the database. There may be a more efficient way, but you could just check the tile to see if it's in your zoom range and add a continue statement if it's not.

z = t[0]
if z < minZoom or z > maxZoom:
  continue

@maxammann
Copy link

I manually deleted the room range using this: https://gist.github.com/zhm/3830471

@AnthonyHervy
Copy link

AnthonyHervy commented Jul 21, 2022

sorry to bump up, someone found a solution to set the zoom level ?
@maxammann where to apply, no found in util.py

@maxammann
Copy link

sorry to bump up, someone found a solution to set the zoom level ?
@maxammann where to apply, no found in util.py

You can open a mbtiles files using sqlite3 on the command line. Then you cam enter the commands from the Github Gist. Make a backup first though.

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

4 participants