Don't guess an excessively large maxzoom when there is only one feature

This commit is contained in:
Erica Fischer
2022-12-12 14:19:18 -08:00
parent 357fff7d81
commit f37077db48
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -2093,7 +2093,12 @@ int read_input(std::vector<source> &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