Commit 78d64e52 authored by duminil's avatar duminil
Browse files

RegionChooser: Beginning to merge both RegionChoosers.

parent 78ce1bc2
......@@ -18,10 +18,15 @@
{
static private WKTReader wktReader = new WKTReader();
//TODO: Test it
static public StringBuffer selectRegionDirectlyFromCityGML(Path citygmlPath, String wktPolygon)
throws IOException, ParseException {
// Instant start = Instant.now();
//TODO: wktPolygon should be in WGS84, and converted here to locate coordinates system
//TODO: GetSRSName, either via CityDoctorModel or reading 50 first lines of the citygmlfile
// CityDoctorModel model = CityDoctorModel.loadWithEnergyADEAndNoSchemaValidation(citygmlPath.toFile());
// GeoCoordinatesAccessor coordinates = GeoCoordinatesAccessor.coordinatesComputedFromBuildingsIfNeeded(model);
// System.out.println(coordinates.getCoordinateReferenceSystem().getName());
Geometry poly = wktReader.read(wktPolygon);
final GeometryFactory gf = new GeometryFactory();
//TODO: Don't read all the file. Not possible for 15GB gml files
......@@ -29,7 +34,7 @@ static public StringBuffer selectRegionDirectlyFromCityGML(Path citygmlPath, Str
Pattern cityObjectPattern = Pattern
.compile("(?s)<(core:)?cityObjectMember>.*?<\\/(core:)?cityObjectMember>\\s*");
//TODO: Allow other coordinate systems
//TODO: Allow other coordinate systems. Either use distinc patterns depending on EPSG, or use CityDoctorModel
Pattern gsk3CoordinatesPattern = Pattern
.compile("(?<![\\d\\.])(3\\d\\d\\d\\d\\d\\d[\\.\\d]*) (5\\d\\d\\d\\d\\d\\d[\\.\\d]*)");
Matcher cityObjectMatcher = cityObjectPattern.matcher(s);
......
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