mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-04 17:35:42 +02:00
Stop --drop-smallest-as-needed from always dropping all points
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.15.1
|
||||||
|
|
||||||
|
* Stop --drop-smallest-as-needed from always dropping all points
|
||||||
|
|
||||||
## 1.15.0
|
## 1.15.0
|
||||||
|
|
||||||
* New strategies for making tiles smaller, with uniform behavior across
|
* New strategies for making tiles smaller, with uniform behavior across
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1488,7 +1488,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
}
|
}
|
||||||
if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
|
if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
|
||||||
extents.push_back(extent);
|
extents.push_back(extent);
|
||||||
if (extent <= minextent) {
|
if (extent <= minextent && t != VT_POINT) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1807,15 +1807,18 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
continue;
|
continue;
|
||||||
} else if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
|
} else if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
|
||||||
minextent_fraction = minextent_fraction * 200000.0 / totalsize * 0.90;
|
minextent_fraction = minextent_fraction * 200000.0 / totalsize * 0.90;
|
||||||
minextent = choose_minextent(extents, minextent_fraction);
|
long long m = choose_minextent(extents, minextent_fraction);
|
||||||
if (minextent > arg->minextent_out) {
|
if (m != minextent) {
|
||||||
arg->minextent_out = minextent;
|
minextent = m;
|
||||||
|
if (minextent > arg->minextent_out) {
|
||||||
|
arg->minextent_out = minextent;
|
||||||
|
}
|
||||||
|
if (!quiet) {
|
||||||
|
fprintf(stderr, "Going to try keeping the biggest %0.2f%% of the features to make it fit\n", minextent_fraction * 100.0);
|
||||||
|
}
|
||||||
|
line_detail++;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if (!quiet) {
|
|
||||||
fprintf(stderr, "Going to try keeping the biggest %0.2f%% of the features to make it fit\n", minextent_fraction * 100.0);
|
|
||||||
}
|
|
||||||
line_detail++;
|
|
||||||
continue;
|
|
||||||
} else if (prevent[P_DYNAMIC_DROP] || additional[A_DROP_FRACTION_AS_NEEDED]) {
|
} else if (prevent[P_DYNAMIC_DROP] || additional[A_DROP_FRACTION_AS_NEEDED]) {
|
||||||
fraction = fraction * 200000 / totalsize * 0.95;
|
fraction = fraction * 200000 / totalsize * 0.95;
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
@@ -1872,15 +1875,18 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
line_detail++;
|
line_detail++;
|
||||||
} else if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
|
} else if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
|
||||||
minextent_fraction = minextent_fraction * max_tile_size / compressed.size() * 0.90;
|
minextent_fraction = minextent_fraction * max_tile_size / compressed.size() * 0.90;
|
||||||
minextent = choose_minextent(extents, minextent_fraction);
|
long long m = choose_minextent(extents, minextent_fraction);
|
||||||
if (minextent > arg->minextent_out) {
|
if (m != minextent) {
|
||||||
arg->minextent_out = minextent;
|
minextent = m;
|
||||||
|
if (minextent > arg->minextent_out) {
|
||||||
|
arg->minextent_out = minextent;
|
||||||
|
}
|
||||||
|
if (!quiet) {
|
||||||
|
fprintf(stderr, "Going to try keeping the biggest %0.2f%% of the features to make it fit\n", minextent_fraction * 100.0);
|
||||||
|
}
|
||||||
|
line_detail++;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if (!quiet) {
|
|
||||||
fprintf(stderr, "Going to try keeping the biggest %0.2f%% of the features to make it fit\n", minextent_fraction * 100.0);
|
|
||||||
}
|
|
||||||
line_detail++;
|
|
||||||
continue;
|
|
||||||
} else if (prevent[P_DYNAMIC_DROP] || additional[A_DROP_FRACTION_AS_NEEDED]) {
|
} else if (prevent[P_DYNAMIC_DROP] || additional[A_DROP_FRACTION_AS_NEEDED]) {
|
||||||
// The 95% is a guess to avoid too many retries
|
// The 95% is a guess to avoid too many retries
|
||||||
// and probably actually varies based on how much duplicated metadata there is
|
// and probably actually varies based on how much duplicated metadata there is
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
#define VERSION "tippecanoe v1.15.0\n"
|
#define VERSION "tippecanoe v1.15.1\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user