Merge remote-tracking branch 'origin/main' into compression

This commit is contained in:
Erica Fischer
2023-01-26 16:44:21 -08:00
7 changed files with 2295 additions and 5 deletions
+15 -3
View File
@@ -2059,7 +2059,12 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
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
@@ -2170,6 +2175,13 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
}
}
if (basezoom == -2 && basezoom_marker_width == 1) { // -Bg, not -Bg###
basezoom = maxzoom;
if (!quiet) {
fprintf(stderr, "Using base zoom of -z%d\n", basezoom);
}
}
if (maxzoom < minimum_maxzoom) {
if (!quiet) {
fprintf(stderr, "Using minimum maxzoom of -z%d\n", minimum_maxzoom);
@@ -2186,7 +2198,7 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
fix_dropping = true;
if (basezoom == -1) {
if (basezoom == -1) { // basezoom unspecified
basezoom = maxzoom;
}
}
@@ -3393,7 +3405,7 @@ int main(int argc, char **argv) {
fprintf(stderr, "%s: Reducing minimum detail to match low detail %d\n", argv[0], min_detail);
}
if (basezoom == -1) {
if (basezoom == -1) { // basezoom unspecified
if (!guess_maxzoom) {
basezoom = maxzoom;
}