From 897d62359b85e7a285f0380c87fe57e9d8bf578a Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Wed, 25 Oct 2023 14:19:43 -0700 Subject: [PATCH] Progress on preventing polygon collapse --- tile.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tile.cpp b/tile.cpp index 33870f48..1dcd3237 100644 --- a/tile.cpp +++ b/tile.cpp @@ -614,8 +614,11 @@ void *partial_feature_worker(void *v) { drawvec geom = (*partials)[i].geoms[0]; if (t == VT_POLYGON) { - geom = clean_or_clip_poly(geom, 0, 0, false, false); - fix_by_triangulation(geom, z, out_detail); + drawvec cleaned = clean_or_clip_poly(geom, 0, 0, false, false); + drawvec fixed = fix_by_triangulation(geom, z, out_detail); + if (fixed != cleaned) { + geom = fixed; + } } to_tile_scale(geom, z, out_detail);