Clip the clip regions to the tile bounds to reduce their complexity

This commit is contained in:
Erica Fischer
2024-11-27 12:22:36 -08:00
parent 641f97f7db
commit 75511a74cd
3 changed files with 34 additions and 3 deletions
+2 -3
View File
@@ -387,8 +387,7 @@ drawvec clean_or_clip_poly(drawvec &geom, int z, int buffer, bool clip, bool try
return ret;
}
drawvec clip_poly_poly(drawvec &geom, drawvec const &bounds) {
geom = remove_noop(geom, VT_POLYGON, 0);
drawvec clip_poly_poly(drawvec const &geom, drawvec const &bounds) {
mapbox::geometry::multi_polygon<long long> result;
{
@@ -450,7 +449,7 @@ drawvec clip_poly_poly(drawvec &geom, drawvec const &bounds) {
return ret;
}
drawvec clip_point_poly(drawvec &geom, drawvec const &bounds) {
drawvec clip_point_poly(drawvec const &geom, drawvec const &bounds) {
drawvec out;
for (auto const &p : geom) {
if (pnpoly_mp(bounds, p.x, p.y)) {