From 331bd662bc3b23f81d657fac5b505302c11b94ba Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Fri, 15 Mar 2024 15:38:39 -0700 Subject: [PATCH] Fix cluster-distance, which works by indices, not coordinates --- tile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tile.cpp b/tile.cpp index 97894df5..af829b5b 100644 --- a/tile.cpp +++ b/tile.cpp @@ -2820,12 +2820,14 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std:: int err = INT_MAX; double zoom_gamma = gamma; - unsigned long long zoom_mingap = ((1LL << (GLOBAL_DETAIL - z)) / 256 * cluster_distance) * ((1LL << (GLOBAL_DETAIL - z)) / 256 * cluster_distance); long long zoom_minextent = 0; unsigned long long zoom_mindrop_sequence = 0; size_t zoom_tile_size = 0; size_t zoom_feature_count = 0; + // yes, these need to be 32, not GLOBAL_DETAIL, because clusters operate on indices, not coordinates + unsigned long long zoom_mingap = ((1LL << (32 - z)) / 256 * cluster_distance) * ((1LL << (32 - z)) / 256 * cluster_distance); + for (size_t pass = 0;; pass++) { pthread_t pthreads[threads]; std::vector args;