Merge pull request #323 from mapbox/point-area

Stop --drop-smallest-as-needed from always dropping all points
This commit is contained in:
Eric Fischer 2016-11-23 15:10:25 -08:00 committed by GitHub
commit c68d553e94
4 changed files with 1800 additions and 18 deletions

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

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

View File

@ -1 +1 @@
#define VERSION "tippecanoe v1.15.0\n"
#define VERSION "tippecanoe v1.15.1\n"