mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Avoid potential infinite loop from choosing the same min density again
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.19.1
|
||||||
|
|
||||||
|
* Add an option to increase maxzoom if features are still being dropped
|
||||||
|
|
||||||
## 1.19.0
|
## 1.19.0
|
||||||
|
|
||||||
* Tile-join can merge and create directories, not only mbtiles
|
* Tile-join can merge and create directories, not only mbtiles
|
||||||
|
|||||||
@@ -1803,7 +1803,11 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
continue;
|
continue;
|
||||||
} else if (additional[A_DROP_DENSEST_AS_NEEDED]) {
|
} else if (additional[A_DROP_DENSEST_AS_NEEDED]) {
|
||||||
mingap_fraction = mingap_fraction * 200000.0 / totalsize * 0.90;
|
mingap_fraction = mingap_fraction * 200000.0 / totalsize * 0.90;
|
||||||
mingap = choose_mingap(indices, mingap_fraction);
|
unsigned long long mg = choose_mingap(indices, mingap_fraction);
|
||||||
|
if (mg <= mingap) {
|
||||||
|
mg = mingap * 1.5;
|
||||||
|
}
|
||||||
|
mingap = mg;
|
||||||
if (mingap > arg->mingap_out) {
|
if (mingap > arg->mingap_out) {
|
||||||
arg->mingap_out = mingap;
|
arg->mingap_out = mingap;
|
||||||
arg->still_dropping = true;
|
arg->still_dropping = true;
|
||||||
@@ -1883,7 +1887,11 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
line_detail++; // to keep it the same when the loop decrements it
|
line_detail++; // to keep it the same when the loop decrements it
|
||||||
} else if (additional[A_DROP_DENSEST_AS_NEEDED]) {
|
} else if (additional[A_DROP_DENSEST_AS_NEEDED]) {
|
||||||
mingap_fraction = mingap_fraction * max_tile_size / compressed.size() * 0.90;
|
mingap_fraction = mingap_fraction * max_tile_size / compressed.size() * 0.90;
|
||||||
mingap = choose_mingap(indices, mingap_fraction);
|
unsigned long long mg = choose_mingap(indices, mingap_fraction);
|
||||||
|
if (mg <= mingap) {
|
||||||
|
mg = mingap * 1.5;
|
||||||
|
}
|
||||||
|
mingap = mg;
|
||||||
if (mingap > arg->mingap_out) {
|
if (mingap > arg->mingap_out) {
|
||||||
arg->mingap_out = mingap;
|
arg->mingap_out = mingap;
|
||||||
arg->still_dropping = true;
|
arg->still_dropping = true;
|
||||||
@@ -2272,7 +2280,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo
|
|||||||
i = args[thread].wrote_zoom;
|
i = args[thread].wrote_zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == maxzoom && args[thread].still_dropping && maxzoom < MAX_ZOOM) {
|
if (additional[A_EXTEND_ZOOMS] && i == maxzoom && args[thread].still_dropping && maxzoom < MAX_ZOOM) {
|
||||||
maxzoom++;
|
maxzoom++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
#define VERSION "tippecanoe v1.19.0\n"
|
#define VERSION "tippecanoe v1.19.1\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user