diff --git a/CHANGELOG.md b/CHANGELOG.md index 07fb3ba7..b13d5463 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 2.16.0 * Make as-needed dropping and coalescing much faster: Don't keep scanning through the whole layer looking for another small feature. +* Don't guess an excessively large maxzoom when there is only one feature ## 2.15.2 diff --git a/main.cpp b/main.cpp index 665a920f..9a6d30a5 100644 --- a/main.cpp +++ b/main.cpp @@ -2093,7 +2093,12 @@ int read_input(std::vector &sources, char *fname, int maxzoom, int minzo exit(EXIT_NODATA); } - if (count > 0) { + if (count == 0 && dist_count == 0) { + maxzoom = minimum_maxzoom; + if (droprate < 0) { + droprate = 1; + } + } else if (count > 0) { double stddev = sqrt(m2 / count); // Geometric mean is appropriate because distances between features