Improve quality of coalescing-as-needed; add options to limit feature count (#25)

* Add an option to limit geometry vertex count

* Update docs and changelog

* Track desired feature count and geometry size in strategies

* Remove dead code for a long-forgotten inaccessible option

* Fix the option name in changelog

* Refine coalesce-smallest to only coalesce onto other small features

* Clean polygons before coalescing-as-needed

* Don't accumulate tiny polygon holes as negative dust

* Add the option not to limit the feature count at maxzoom

* Add options to limit feature count more abruptly in each tile

* Revert "Add the option not to limit the feature count at maxzoom"

This reverts commit ace173ab7a.

* Revert "Fix the option name in changelog"

This reverts commit 38dbce8405.

* Revert "Add an option to limit geometry vertex count"

This reverts commit d379fdf06b.

* Remove test for reverted option

* Remove more leftovers from geometry size limiting

* Update changelog
This commit is contained in:
Erica Fischer
2022-11-17 13:09:10 -08:00
committed by GitHub
parent 7733cced43
commit 8eec2be462
30 changed files with 1773 additions and 636 deletions
+3 -1
View File
@@ -44,15 +44,17 @@ struct strategy {
size_t coalesced_as_needed = 0;
size_t detail_reduced = 0;
size_t tile_size = 0;
size_t feature_count = 0;
size_t tiny_polygons = 0;
strategy(const atomic_strategy &s, size_t ts) {
strategy(const atomic_strategy &s, size_t ts, size_t fc) {
dropped_by_rate = s.dropped_by_rate;
dropped_by_gamma = s.dropped_by_gamma;
dropped_as_needed = s.dropped_as_needed;
coalesced_as_needed = s.coalesced_as_needed;
detail_reduced = s.detail_reduced;
tile_size = ts;
feature_count = fc;
tiny_polygons = s.tiny_polygons;
}