Skip to content

Commit ca0ead2

Browse files
committed
fix #17570
1 parent c13cdc9 commit ca0ead2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/osmWebWizard.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ def getRelative(self, options):
180180

181181
def build(self):
182182
# output name for the osm file, will be used by osmBuild, can be
183-
# deleted after the process
183+
# deleted after the process (but should generally be kept for rebuilding)
184184
self.filename("osm", "_bbox.osm.xml.gz")
185+
# configuration for re-downloading the same area from OSM
186+
self.filename("ogc", ".ogcfg")
185187
# output name for the net file, will be used by osmBuild, randomTrips and sumo-gui
186188
self.filename("net", ".net.xml.gz")
187189

@@ -197,6 +199,8 @@ def build(self):
197199
osmArgs += ["-u", self.data["osmMirror"]]
198200
if 'roadTypes' in self.data:
199201
osmArgs += ["-r", json.dumps(self.data["roadTypes"])]
202+
# cannot write config by calling osmGet.get because saving config triggers sys.exit()
203+
subprocess.call([osmGet.__file__] + osmArgs + ['-C', self.files['ogc']])
200204
osmGet.get(osmArgs)
201205

202206
if not os.path.exists(self.files["osm"]):

0 commit comments

Comments
 (0)