Fix bad interaction between dynamic dropping and limiting by truncation

This commit is contained in:
Erica Fischer
2024-09-04 16:10:25 -07:00
parent f3b575ead4
commit ef70af09ce
4 changed files with 347 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
# 2.61.0
* Fix another bad interaction, this time between dropping-as-needed and --limit-tile-feature-count
# 2.60.0
* Fix bad interaction between --retain-points-multiplier and stopping early when the tile feature limit is reached
+5 -1
View File
@@ -2407,13 +2407,17 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
if (z == maxzoom && limit_tile_feature_count_at_maxzoom != 0) {
if (layer_features.size() > limit_tile_feature_count_at_maxzoom) {
can_stop_early = false;
// this is maxzoom; ok to stop early still because they said to limit abruptly
layer_features.resize(limit_tile_feature_count_at_maxzoom);
too_many_features = false; // don't try to drop; we have already truncated
skipped = 0; // doesn't matter that we skipped features; we have truncated
}
} else if (limit_tile_feature_count != 0) {
if (layer_features.size() > limit_tile_feature_count) {
can_stop_early = false;
layer_features.resize(limit_tile_feature_count);
too_many_features = false; // don't try to drop; we have already truncated
skipped = 0; // doesn't matter that we skipped features; we have truncated
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "v2.60.0"
#define VERSION "v2.61.0"
#endif