Add --cluster-maxzoom option (#75)

* Add `--cluster-maxzoom` option

* Add tests, update changelog

* Update manpage

* Update tests

---------

Co-authored-by: Aurele Nitoref <aurele.nitoref@icloud.com>
This commit is contained in:
Erica Fischer
2023-02-24 16:05:45 -08:00
committed by GitHub
co-authored by Aurele Nitoref
parent 3d714e32b0
commit 329dd86bfd
9 changed files with 2552 additions and 7 deletions
+1 -1
View File
@@ -2088,7 +2088,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
// representative of the other features in the tile.
const size_t MAX_INDICES = 100000;
if (additional[A_CLUSTER_DENSEST_AS_NEEDED] || cluster_distance != 0) {
if (z <= cluster_maxzoom && (additional[A_CLUSTER_DENSEST_AS_NEEDED] || cluster_distance != 0)) {
if (indices.size() < MAX_INDICES) {
indices.push_back(sf.index);
}