Stop --drop-smallest-as-needed from always dropping all points

This commit is contained in:
Eric Fischer
2016-11-23 13:57:32 -08:00
parent 2d022c6c57
commit c867ce5f32
4 changed files with 1800 additions and 18 deletions
+4
View File
@@ -1,3 +1,7 @@
## 1.15.1
* Stop --drop-smallest-as-needed from always dropping all points
## 1.15.0
* New strategies for making tiles smaller, with uniform behavior across
File diff suppressed because it is too large Load Diff
+9 -3
View File
@@ -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]) {
extents.push_back(extent);
if (extent <= minextent) {
if (extent <= minextent && t != VT_POINT) {
continue;
}
}
@@ -1807,7 +1807,9 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
continue;
} else if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
minextent_fraction = minextent_fraction * 200000.0 / totalsize * 0.90;
minextent = choose_minextent(extents, minextent_fraction);
long long m = choose_minextent(extents, minextent_fraction);
if (m != minextent) {
minextent = m;
if (minextent > arg->minextent_out) {
arg->minextent_out = minextent;
}
@@ -1816,6 +1818,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
}
line_detail++;
continue;
}
} else if (prevent[P_DYNAMIC_DROP] || additional[A_DROP_FRACTION_AS_NEEDED]) {
fraction = fraction * 200000 / totalsize * 0.95;
if (!quiet) {
@@ -1872,7 +1875,9 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
line_detail++;
} else if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
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 (m != minextent) {
minextent = m;
if (minextent > arg->minextent_out) {
arg->minextent_out = minextent;
}
@@ -1881,6 +1886,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
}
line_detail++;
continue;
}
} else if (prevent[P_DYNAMIC_DROP] || additional[A_DROP_FRACTION_AS_NEEDED]) {
// The 95% is a guess to avoid too many retries
// and probably actually varies based on how much duplicated metadata there is
+1 -1
View File
@@ -1 +1 @@
#define VERSION "tippecanoe v1.15.0\n"
#define VERSION "tippecanoe v1.15.1\n"