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

ConvexHullCalculator: Some buildings don't have any coordinates. Ignore them.

parent 188ecdf7
...@@ -59,11 +59,13 @@ static public StringBuffer selectRegionDirectlyFromCityGML(Path citygmlPath, Str ...@@ -59,11 +59,13 @@ static public StringBuffer selectRegionDirectlyFromCityGML(Path citygmlPath, Str
sb.append(replaceEnvelopeInHeader(citygml.getHeader(), poly.getEnvelopeInternal(), srsName)); sb.append(replaceEnvelopeInHeader(citygml.getHeader(), poly.getEnvelopeInternal(), srsName));
} }
buildingsCount += 1; buildingsCount += 1;
Coordinate coord = new Coordinate(buildingXmlNode.x, buildingXmlNode.y); if (buildingXmlNode.hasCoordinates()) {
Point point = gf.createPoint(coord); Coordinate coord = new Coordinate(buildingXmlNode.x, buildingXmlNode.y);
if (point.within(poly)) { Point point = gf.createPoint(coord);
foundBuildingsCount++; if (point.within(poly)) {
sb.append(buildingXmlNode.toString()); foundBuildingsCount++;
sb.append(buildingXmlNode.toString());
}
} }
if (buildingsCount % 1000 == 0) { if (buildingsCount % 1000 == 0) {
LOGGER.info("1000 buildings parsed"); LOGGER.info("1000 buildings parsed");
......
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