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

RegionChooser: LOGGER.

parent 5e412df1
......@@ -57,34 +57,10 @@ public JavaScriptFXBridge() {
}
public void refreshHulls() throws IOException {
System.out.println("Looking for hulls in " + repo);
String header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<kml>\n" + " <Document>\n";
String footer = " </Document>\n" + "</kml>";
ConvexHullCalculator.extractHullsForEveryCityGML(repo,
(hullKML -> jsApp.call("addCityGmlHull", header + hullKML + footer)));
// try (BufferedWriter bw = Files.newBufferedWriter(url)) {
// bw.write(header);
// Files.walk(repo)
// .filter(Files::isRegularFile)
// .filter(p -> p.toString().contains(".cache") && p.toString().endsWith(".kml"))
// .forEach(p -> {
// System.out.println("Parsing " + p);
// try {
// String hullKML = new String(Files.readAllBytes(p), StandardCharsets.UTF_8);
// jsApp.call("addCityGmlHull", header + hullKML + footer);
// List<String> lines = Files.readAllLines(p);
// for (String line : lines) {
// bw.write(line + "\n");
// }
// } catch (IOException ex) {
// ex.printStackTrace();
// }
// });
// bw.write(footer);
// } catch (Exception ex) {
// ex.printStackTrace();
// }
// Paths.get("src/eu/simstadt/regionchooser/website").relativize(url).toString();
}
public void downloadRegion(String wktPolygon, String productName, JSObject novaFactoryLayer)
......
......@@ -371,7 +371,7 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
fxapp.log(message);
}
refresh_btn.disabled = false;
dataPanel.append('Importing citgyml. Please wait.');
dataPanel.append("Importing citgyml. Please wait.<br/>\n");
fxapp.refreshHulls();
updateGMLPolygons();
dataPanel.empty();
......
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