Add an option not to reduce tiny polygons to dust at maxzoom

This commit is contained in:
Erica Fischer
2023-08-28 14:21:11 -07:00
parent e5f2a5d1d3
commit 03f0882bb6
5 changed files with 13 additions and 2 deletions
+3 -1
View File
@@ -2184,7 +2184,9 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
bool reduced = false;
if (sf.t == VT_POLYGON) {
if (!prevent[P_TINY_POLYGON_REDUCTION] && !additional[A_GRID_LOW_ZOOMS]) {
bool prevent_tiny = prevent[P_TINY_POLYGON_REDUCTION] ||
(prevent[P_TINY_POLYGON_REDUCTION_AT_MAXZOOM] && z == maxzoom);
if (!prevent_tiny && !additional[A_GRID_LOW_ZOOMS]) {
sf.geometry = reduce_tiny_poly(sf.geometry, z, line_detail, &reduced, &accum_area, &sf, &tiny_feature);
if (reduced) {
strategy->tiny_polygons++;