Browse Source

fix range

master
Markus Bergholz 1 year ago
parent
commit
61ddc5fb99
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      osm/getTiles.py
  2. +2
    -2
      osm/getTilesThreaded.py

+ 2
- 2
osm/getTiles.py View File

@ -26,12 +26,12 @@ def base_url(zoom, x, y):
def get_pngs(zoom):
progress = progressbar.ProgressBar()
max_x = int(pow(2,zoom)-1)
max_x = int(pow(2,zoom))
for x in progress(range(0, max_x)):
if r.get("stop"):
break
r.set("x", x)
for y in range(0, int(pow(2,zoom)-1)):
for y in range(0, int(pow(2,zoom))):
if r.get("stop"):
break
Path(HOME + '/{Z}/{X}'.format(X=x,Z=zoom)).mkdir(parents=True, exist_ok=True)


+ 2
- 2
osm/getTilesThreaded.py View File

@ -38,7 +38,7 @@ def get_and_process_tile(x=None,zoom=None):
if None not in [x, zoom]:
pngquant.config(min_quality=50, max_quality=80, tmp_file=rnd_file())
q("using " + pngquant.config()["tmp_file"])
for y in range(0, int(pow(2,zoom)-1)):
for y in range(0, int(pow(2,zoom))):
q(str(x) + ',' + str(y) + ',' + str(zoom))
# Path(HOME + '/{Z}/{X}'.format(X=x,Z=zoom)).mkdir(parents=True, exist_ok=True)
@ -54,7 +54,7 @@ def get_and_process_tile(x=None,zoom=None):
def get_pngs(zoom):
max_x = int(pow(2,zoom)-1)
max_x = int(pow(2,zoom))
progress = progressbar.ProgressBar()
for x in progress(range(0, max_x)):
n = -1


Loading…
Cancel
Save