summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-14 20:02:46 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-11-14 20:08:41 (GMT)
commit32fda9a929bc839515047a1efde9a9260f1f50e9 (patch)
treed4fa6d1e6d51c47c4c8e7c26ae6440893f4b5c82
parentc816a2bce3c6f748f0f546b6398a1485337a3245 (diff)
Filter polygon holes by their size as well
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/vectorosm-tilecreator/VectorClipper.cpp b/tools/vectorosm-tilecreator/VectorClipper.cpp
index d28b0ba..f2a5c45 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.cpp
+++ b/tools/vectorosm-tilecreator/VectorClipper.cpp
@@ -468,11 +468,16 @@ void VectorClipper::clipPolygon(const GeoDataPlacemark *placemark, const Clipper
auto const & innerBoundaries = polygon->innerBoundaries();
for (index = 0; index < innerBoundaries.size(); ++index) {
+ auto const & innerBoundary = innerBoundaries.at(index);
+ if (minArea > 0.0 && area(innerBoundary) < minArea) {
+ continue;
+ }
+
auto const & innerRingOsmData = placemarkOsmData.memberReference(index);
clipper.Clear();
clipper.AddPath(path, ptClip, true);
Path innerPath;
- foreach(auto const & node, innerBoundaries.at(index)) {
+ foreach(auto const & node, innerBoundary) {
innerPath << IntPoint(&node);
}
clipper.AddPath(innerPath, ptSubject, true);