mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
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:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user