Commit a0569367 authored by Rick Gruber-Riemer's avatar Rick Gruber-Riemer

Simplifying path to output

parent 82a14299
......@@ -13,10 +13,7 @@ import tools
def main():
if parameters.PATH_TO_OUTPUT:
scenery_path = parameters.PATH_TO_OUTPUT
else:
scenery_path = parameters.PATH_TO_SCENERY
scenery_path = parameters.get_output_path()
scenery_path += os.sep + "Objects"
if os.path.exists(scenery_path):
......
......@@ -1243,10 +1243,7 @@ if __name__ == "__main__":
tex.manager.facades, tex.manager.roofs)
# -- initialize STG_Manager
if parameters.PATH_TO_OUTPUT:
path_to_output = parameters.PATH_TO_OUTPUT
else:
path_to_output = parameters.PATH_TO_SCENERY
path_to_output = parameters.get_output_path()
replacement_prefix = re.sub('[\/]', '_', parameters.PREFIX)
stg_manager = stg_io2.STG_Manager(path_to_output, OUR_MAGIC, replacement_prefix, overwrite=True)
# for node in ac_nodes:
......
......@@ -180,10 +180,7 @@ def main():
# , coord_transformator)
# logging.info('Number of forest to process: %s', len(trees))
# # -- initialize STG_Manager
if parameters.PATH_TO_OUTPUT:
path_to_output = parameters.PATH_TO_OUTPUT
else:
path_to_output = parameters.PATH_TO_SCENERY
path_to_output = parameters.get_output_path()
replacement_prefix = re.sub('[\/]', '_', parameters.PREFIX)
stg_manager = stg_io2.STG_Manager(path_to_output, OUR_MAGIC, replacement_prefix, overwrite=True)
......
......@@ -1522,10 +1522,7 @@ def main():
handler = None
# -- initialize STG_Manager
if parameters.PATH_TO_OUTPUT:
path_to_output = parameters.PATH_TO_OUTPUT
else:
path_to_output = parameters.PATH_TO_SCENERY
path_to_output = parameters.get_output_path()
replacement_prefix = re.sub('[\/]', '_', parameters.PREFIX)
stg_manager = stg_io2.STG_Manager(path_to_output, OUR_MAGIC, replacement_prefix, overwrite=True)
......
......@@ -250,6 +250,12 @@ POINTS_ON_LINE_DISTANCE_MAX = 1000 # the maximum distance between two points on
# default_args_end # DO NOT MODIFY THIS LINE
def get_output_path():
if PATH_TO_OUTPUT:
return PATH_TO_OUTPUT
return PATH_TO_SCENERY
def get_OSM_file_name():
"""
Returns the path to the OSM File
......
......@@ -409,10 +409,7 @@ def main():
elev = tools.get_interpolator()
# -- initialize STG_Manager
if parameters.PATH_TO_OUTPUT:
path_to_output = parameters.PATH_TO_OUTPUT
else:
path_to_output = parameters.PATH_TO_SCENERY
path_to_output = parameters.get_output_path()
replacement_prefix = re.sub('[\/]', '_', parameters.PREFIX)
stg_manager = stg_io2.STG_Manager(path_to_output, OUR_MAGIC, replacement_prefix, overwrite=True)
......
......@@ -301,10 +301,7 @@ def main():
elev = tools.get_interpolator()
# -- initialize STG_Manager
if parameters.PATH_TO_OUTPUT:
path_to_output = parameters.PATH_TO_OUTPUT
else:
path_to_output = parameters.PATH_TO_SCENERY
path_to_output = parameters.get_output_path()
replacement_prefix = re.sub('[\/]', '_', parameters.PREFIX)
stg_manager = stg_io2.STG_Manager(path_to_output, OUR_MAGIC, replacement_prefix, overwrite=True)
......
......@@ -1114,10 +1114,7 @@ def main():
handler.parse(parameters.get_OSM_file_name())
logging.info("ways: %i", len(roads))
if parameters.PATH_TO_OUTPUT:
path_to_output = parameters.PATH_TO_OUTPUT
else:
path_to_output = parameters.PATH_TO_SCENERY
path_to_output = parameters.get_output_path()
logging.debug("before linear " + str(roads))
roads.process() # does the heavy lifting based on OSM data including clustering
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment