Commit 36a43327 authored by Eric Duminil's avatar Eric Duminil
Browse files

RegionChooser: fxapp.test(); for debugging purposes.

parent 83699c28
......@@ -70,6 +70,20 @@ protected Integer call() throws Exception {
new Thread(task).start();
}
/*
* Download a small region from Gruenbuehl. Useful to test inside js console (with 'fxapp.test();').
*/
public void test() {
try {
downloadRegionFromCityGML(
"POLYGON((3515896.6132767177 5415942.563662692,3516013.1135652466 5415930.341095623,3516035.1608944996 5415925.696283888,3516052.531667652 5415905.3452489935,3516053.640043498 5415793.1428597355,3516092.996199113 5415790.117097386,3516086.9957373445 5415687.30812527,3515953.2106800284 5415687.710348818,3515893.4419519473 5415673.416324939,3515876.73573549 5415736.92758554,3515896.6132767177 5415942.563662692))",
"Gruenbuehl", "Gruenbuehl_LOD2_validated+ADE.gml",
"EPSG:34567");
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void extractZIPtoGML(String zipFilename) throws IOException {
ZipFile zipFile = new ZipFile(zipFilename);
Enumeration<? extends ZipEntry> entries = zipFile.entries();
......@@ -180,6 +194,7 @@ public RegionChooserBrowser() {
JSObject win = (JSObject) webEngine.executeScript("window");
JavaScriptFXBridge fxapp = new JavaScriptFXBridge();
win.setMember("fxapp", fxapp);
webEngine.executeScript("fxapp.log('CALLED FROM FXAPP')");
webEngine.executeScript("console.log = function(message)\n" +
"{\n" +
" fxapp.log(message);\n" +
......@@ -190,15 +205,7 @@ public RegionChooserBrowser() {
RegionChooserFX.LOGGER.warning("NovaFactory CSV not found or corrupt");
ex.printStackTrace();
}
// try {
// fxapp.downloadRegionFromCityGML(
// "POLYGON((3515896.6132767177 5415942.563662692,3516013.1135652466 5415930.341095623,3516035.1608944996 5415925.696283888,3516052.531667652 5415905.3452489935,3516053.640043498 5415793.1428597355,3516092.996199113 5415790.117097386,3516086.9957373445 5415687.30812527,3515953.2106800284 5415687.710348818,3515893.4419519473 5415673.416324939,3515876.73573549 5415736.92758554,3515896.6132767177 5415942.563662692))",
// "Gruenbuehl", "Gruenbuehl_LOD2_validated+ADE.gml",
// "EPSG:34567");
// } catch (Exception ex) {
// ex.printStackTrace();
//
// }
// fxapp.test();
// System.exit(0);
}
});
......
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