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

Notes.

parent 30b3cb26
......@@ -6,6 +6,7 @@
import java.nio.file.Paths;
import java.util.Scanner;
import java.util.concurrent.Callable;
import java.util.logging.Logger;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.io.WKTReader;
import org.locationtech.jts.io.WKTWriter;
......@@ -23,6 +24,9 @@
@Command(name = "region_chooser", mixinStandardHelpOptions = true, version = "regionChooser x.x", description = "Extracts a region from one or more citygmls.", sortOptions = false)
class RegionChooserCommandLineInterface implements Callable<Integer>
{
private static final Logger LOGGER = Logger.getLogger(RegionChooserCommandLineInterface.class.getName());
@Option(names = { "-i",
"--input" }, required = true, split = ",", description = "Citygml files to extract from", paramLabel = "input.gml")
//TODO: Allow folders too?
......@@ -47,7 +51,6 @@ class RegionChooserCommandLineInterface implements Callable<Integer>
public Integer call() throws Exception {
//TODO: Move as much logic to utils as possible
//TODO: Test
//TODO: Use logger
CoordinateReferenceSystem localCRS;
if (espgId == null) {
......@@ -55,7 +58,7 @@ public Integer call() throws Exception {
} else {
localCRS = RegionChooserUtils.crsFromSrsName("EPSG:" + espgId);
}
System.out.println("Coordinate system is " + localCRS);
LOGGER.info("Coordinate system: " + localCRS);
String wktPolygon;
......@@ -81,7 +84,7 @@ public Integer call() throws Exception {
.write(RegionChooserUtils.changePolygonCRS(wgs84Polygon, RegionChooserUtils.WGS84, localCRS));
}
System.out.println("WKT Polygon : " + wktPolygon);
LOGGER.info("WKT Polygon expressed in local coordinates: " + wktPolygon);
StringBuilder sb = RegionExtractor.selectRegionDirectlyFromCityGML(wktPolygon, localCRS.toString(), citygmls);
......
......@@ -28,7 +28,8 @@ public BuildingXmlNode(VTDNav navigator, int buildingOffset, int buildingLength)
this.coordinatesFinder = new AutoPilot(navigator);
this.buildingLength = buildingLength;
this.buildingOffset = buildingOffset;
extractCoordinates(); //NOTE: Should it be done lazily? Is there any reason to extract a BuildingXmlNode without coordinates?
extractCoordinates();
//TODO: Get Building ID too, in order to avoid duplicates?
}
public boolean hasCoordinates() {
......
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