Commit 841a9dc9 authored by Eric Duminil's avatar Eric Duminil
Browse files

No output file selected.

parent 19d0fef6
......@@ -87,6 +87,10 @@ public int downloadRegionFromCityGMLs(String wktPolygon, String project, String
File outputFile = selectSaveFileWithDialog(project,
csvCitygmls.replace(";", "_").replace(".gml", ""), "selected_region");
if (outputFile == null) {
return -1;
}
int count;
try (BufferedWriter gmlWriter = Files.newBufferedWriter(outputFile.toPath())) {
count = RegionExtractor.selectRegionDirectlyFromCityGML(wktPolygon, srsName, gmlWriter, paths);
......
......@@ -244,7 +244,11 @@ var regionChooser = (function(){
console.log("Selected region is written in " + srsName + " coordinate system.");
try {
var count = fxapp.downloadRegionFromCityGMLs(sketchAsWKT(srsName), project, citygmlNames.join(";"), srsName);
dataPanel.prepend("<h2 class='ok'>Done! (" + count + " buildings found) </h2><br/>\n");
if (count == -1){
console.log("No output file has been selected.");
} else {
dataPanel.prepend("<h2 class='ok'>Done! (" + count + " buildings found) </h2><br/>\n");
}
} catch (e) {
console.warn("ERROR : " + e);
dataPanel.prepend("<h2 class='error'>Some problem occured!</h2><br/>\n");
......
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