Fix tile-join crash when trying to merge empty tilesets with --overzoom (#138)

* Fix tile-join crash when trying to merge empty tilesets with --overzoom

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

* Add test for prevention of tiny polygon reduction at maxzoom

* Change version number
This commit is contained in:
Erica Fischer
2023-08-31 13:02:03 -07:00
committed by GitHub
parent 2ec6180003
commit e6d05bc317
11 changed files with 409 additions and 4 deletions
+4 -2
View File
@@ -2183,10 +2183,12 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
fraction_accum -= 1;
bool still_need_simplification_after_reduction = false;
if (sf.t == VT_POLYGON && sf.geometry.size() > 0) {
if (sf.t == VT_POLYGON) {
bool simplified_away_by_reduction = false;
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, &still_need_simplification_after_reduction, &simplified_away_by_reduction, &accum_area, &sf, &tiny_feature);
if (simplified_away_by_reduction) {
strategy->tiny_polygons++;