Commit b373a7a3 authored by Eric Duminil's avatar Eric Duminil
Browse files

Make sure folders exist.

parent 20cbddef
......@@ -173,6 +173,7 @@ public class GreenEnricher implements Runnable
OsmData osmData = new OsmData();
String boundingBoxString = GreenEnricher.extractAndConvertBoundingBox(cityModel, osmData);
String boundingBoxBasename = boundingBoxString.replace(",", "__").replace('.', '_');
Files.createDirectories(cacheFolder);
Path osmCache = cacheFolder.resolve("osm_response_" + boundingBoxBasename + ".xml");
if (!Files.exists(osmCache)) {
System.out.println("Downloading OSM data for " + boundingBoxString);
......@@ -206,6 +207,8 @@ public class GreenEnricher implements Runnable
String inputString = citygmlInput.getFileName().toString();
String inputPathWithoutFileEnding = inputString.substring(0, inputString.lastIndexOf('.'));
Files.createDirectories(outputFolder);
Path outputPath = outputFolder.resolve(inputPathWithoutFileEnding + "_" + outputSuffix + ".gml");
System.out.println("Writing output file to " + outputPath);
writeCityGML(cityModel, outputPath);
......
Supports Markdown
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