summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-20 19:35:01 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-20 19:36:20 (GMT)
commit9d3bc52f0bfae57d2ce54ca22e33e91e2684ecc0 (patch)
tree96e1fb1a71a214a7de943a55015581f3db7d3147
parent232ef7aa54cba696660dfa6b5e7a217ea619da3b (diff)
Preserve collinear points to keep artificial clip border points.
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.cpp1
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/vectorosm-tilecreator/VectorClipper.cpp b/tools/vectorosm-tilecreator/VectorClipper.cpp
index 30cae09..0cbee8e 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.cpp
+++ b/tools/vectorosm-tilecreator/VectorClipper.cpp
@@ -249,6 +249,7 @@ void VectorClipper::clipPolygon(const GeoDataPlacemark *placemark, const Clipper
}
Clipper clipper;
+ clipper.PreserveCollinear(true);
clipper.AddPath(tileBoundary, ptClip, true);
clipper.AddPath(path, ptSubject, true);
Paths paths;
diff --git a/tools/vectorosm-tilecreator/VectorClipper.h b/tools/vectorosm-tilecreator/VectorClipper.h
index 22cd77d..8f53471 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.h
+++ b/tools/vectorosm-tilecreator/VectorClipper.h
@@ -46,6 +46,7 @@ private:
}
Clipper clipper;
+ clipper.PreserveCollinear(true);
bool const isClosed = ring->isClosed();
clipper.AddPath(tileBoundary, ptClip, true);
clipper.AddPath(path, ptSubject, isClosed);