mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Don't do the drop rate adjustment until the maxzoom is finalized
This commit is contained in:
@@ -2166,12 +2166,6 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
|||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
fprintf(stderr, "Choosing a drop rate of %f\n", droprate);
|
fprintf(stderr, "Choosing a drop rate of %f\n", droprate);
|
||||||
}
|
}
|
||||||
|
|
||||||
droprate /= exp(log(drop_rate_multiplier) / maxzoom);
|
|
||||||
|
|
||||||
if (drop_rate_multiplier != 1 && !quiet) {
|
|
||||||
fprintf(stderr, "Adjusting drop rate to %f with multiplier\n", droprate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2210,7 +2204,7 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
|||||||
// or the United States to z13.
|
// or the United States to z13.
|
||||||
|
|
||||||
if (total_tile_count > 2 * 1024 * 1024) {
|
if (total_tile_count > 2 * 1024 * 1024) {
|
||||||
printf("Limiting maxzoom to -z%d to keep from generating %lld tiles\n", i - 1, (long long) total_tile_count);
|
fprintf(stderr, "Limiting maxzoom to -z%d to keep from generating %lld tiles\n", i - 1, (long long) total_tile_count);
|
||||||
maxzoom = i - 1;
|
maxzoom = i - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2230,6 +2224,14 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
|||||||
maxzoom = minzoom;
|
maxzoom = minzoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (drop_rate_multiplier != 1 && maxzoom != 0) {
|
||||||
|
droprate /= exp(log(drop_rate_multiplier) / maxzoom);
|
||||||
|
|
||||||
|
if (!quiet) {
|
||||||
|
fprintf(stderr, "Adjusting drop rate to %f with multiplier %f\n", droprate, drop_rate_multiplier);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fix_dropping = true;
|
fix_dropping = true;
|
||||||
|
|
||||||
if (basezoom == -1) {
|
if (basezoom == -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user