Added first error handling and move of pole files
Signed-off-by: merspieler <merspieler@airmail.cc>
This commit is contained in:
parent
c80e8ee2b2
commit
692aa28455
1 changed files with 7 additions and 3 deletions
|
@ -9,13 +9,17 @@ state4 = ['nw', 'ne', 'sw', 'se']
|
||||||
state2 = ['s', 'n']
|
state2 = ['s', 'n']
|
||||||
|
|
||||||
def run_cut(path, step, name, start_file=None):
|
def run_cut(path, step, name, start_file=None):
|
||||||
print("Building: " + name + "...")
|
|
||||||
if start_file != None:
|
if start_file != None:
|
||||||
os.system("osmium extract -c " + path + name + ".json " + start_file + " --overwrite")
|
print("Splitting world in 4..."
|
||||||
|
ret = os.system("osmium extract -c " + path + name + ".json " + start_file + " --overwrite")
|
||||||
|
if ret == 0:
|
||||||
|
os.system("mv n-pole.osm.pbf output/")
|
||||||
|
os.system("mv s-pole.osm.pbf output/")
|
||||||
else:
|
else:
|
||||||
|
print("Building: " + name + "...")
|
||||||
os.system("osmium extract -c " + path + str(step) + "-" + name + ".json " + name + ".osm.pbf --overwrite")
|
os.system("osmium extract -c " + path + str(step) + "-" + name + ".json " + name + ".osm.pbf --overwrite")
|
||||||
|
|
||||||
run_cut(config_path + prefix, "1", world_file)
|
run_cut(config_path + prefix, 1, "", world_file)
|
||||||
con_pre = config_path + prefix
|
con_pre = config_path + prefix
|
||||||
for i in range(0, len(state4)):
|
for i in range(0, len(state4)):
|
||||||
run_cut(con_pre, 2, state4[i])
|
run_cut(con_pre, 2, state4[i])
|
||||||
|
|
Loading…
Reference in a new issue