If we truncated but still have the data and need to drop, revive

This commit is contained in:
Erica Fischer
2025-06-02 11:29:53 -07:00
parent 8193c716c7
commit 12f828e555
2 changed files with 29 additions and 7 deletions
@@ -9,7 +9,7 @@
"maxzoom": "14",
"minzoom": "12",
"name": "tests/tl_2022_11_tract/out/-z17_-Z12_--coalesce-densest-as-needed_--generate-variable-depth-tile-pyramid_-M10000.json.check.mbtiles",
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{},{\"coalesced_as_needed\":85,\"tile_size_desired\":49853,\"truncated_zooms\":2},{\"tile_size_desired\":16021,\"truncated_zooms\":16},{\"truncated_zooms\":20},{},{},{}]",
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{},{\"coalesced_as_needed\":85,\"tile_size_desired\":49853},{\"tile_size_desired\":16021,\"truncated_zooms\":17},{\"truncated_zooms\":20},{},{},{}]",
"tippecanoe_decisions": "{\"basezoom\":17,\"droprate\":2.5,\"retain_points_multiplier\":1}",
"type": "overlay",
"version": "2"
@@ -51,10 +51,10 @@
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 12, "x": 1170, "y": 1565 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 262144 }, "features": [
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "001004", "GEOID": "11001001004", "NAME": "10.04", "NAMELSAD": "Census Tract 10.04", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 1471925, "AWATER": 0, "INTPTLAT": "+38.9487665", "INTPTLON": "-077.0853886" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.085728, 38.960777 ], [ -77.085656, 38.960633 ], [ -77.085378, 38.960092 ], [ -77.085263, 38.959870 ], [ -77.085055, 38.959457 ], [ -77.085030, 38.959409 ], [ -77.084902, 38.959158 ], [ -77.084843, 38.959041 ], [ -77.084349, 38.958074 ], [ -77.089203, 38.958074 ], [ -77.088871, 38.958335 ], [ -77.088703, 38.958473 ], [ -77.088520, 38.958618 ], [ -77.088446, 38.958676 ], [ -77.088208, 38.958869 ], [ -77.087696, 38.959274 ], [ -77.087590, 38.959342 ], [ -77.087504, 38.959409 ], [ -77.086842, 38.959922 ], [ -77.086581, 38.960122 ], [ -77.085728, 38.960777 ] ] ] } }
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "001004", "GEOID": "11001001004", "NAME": "10.04", "NAMELSAD": "Census Tract 10.04", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 1471925, "AWATER": 0, "INTPTLAT": "+38.9487665", "INTPTLON": "-077.0853886" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.085721, 38.960777 ], [ -77.085035, 38.959409 ], [ -77.084842, 38.959042 ], [ -77.084348, 38.958074 ], [ -77.089198, 38.958074 ], [ -77.087502, 38.959409 ], [ -77.085721, 38.960777 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "001100", "GEOID": "11001001100", "NAME": "11", "NAMELSAD": "Census Tract 11", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 1676650, "AWATER": 0, "INTPTLAT": "+38.9572432", "INTPTLON": "-077.0776732" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.078362, 38.966544 ], [ -77.078362, 38.958074 ], [ -77.084349, 38.958074 ], [ -77.084843, 38.959041 ], [ -77.084902, 38.959158 ], [ -77.085030, 38.959409 ], [ -77.085055, 38.959457 ], [ -77.085263, 38.959870 ], [ -77.085378, 38.960092 ], [ -77.085656, 38.960633 ], [ -77.085728, 38.960777 ], [ -77.085287, 38.961125 ], [ -77.084637, 38.961639 ], [ -77.084023, 38.962118 ], [ -77.083756, 38.962327 ], [ -77.082974, 38.962940 ], [ -77.082599, 38.963233 ], [ -77.082165, 38.963573 ], [ -77.080471, 38.964889 ], [ -77.080357, 38.964954 ], [ -77.080265, 38.965049 ], [ -77.080078, 38.965196 ], [ -77.078362, 38.966544 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "001100", "GEOID": "11001001100", "NAME": "11", "NAMELSAD": "Census Tract 11", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 1676650, "AWATER": 0, "INTPTLAT": "+38.9572432", "INTPTLON": "-077.0776732" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.078362, 38.966550 ], [ -77.078362, 38.958074 ], [ -77.084348, 38.958074 ], [ -77.085035, 38.959409 ], [ -77.085721, 38.960777 ], [ -77.080078, 38.965198 ], [ -77.078362, 38.966550 ] ] ] } }
] }
] }
,
@@ -469,8 +469,8 @@
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 12, "x": 1172, "y": 1565 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 262144 }, "features": [
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "009507", "GEOID": "11001009507", "NAME": "95.07", "NAMELSAD": "Census Tract 95.07", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 295290, "AWATER": 0, "INTPTLAT": "+38.9584945", "INTPTLON": "-076.9977787" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -76.993904, 38.959020 ], [ -76.993701, 38.958861 ], [ -76.993273, 38.958528 ], [ -76.993244, 38.958506 ], [ -76.993074, 38.958373 ], [ -76.992876, 38.958218 ], [ -76.992738, 38.958111 ], [ -76.992690, 38.958074 ], [ -76.993904, 38.958074 ], [ -76.993904, 38.959020 ] ] ] } }
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "009507", "GEOID": "11001009507", "NAME": "95.07", "NAMELSAD": "Census Tract 95.07", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 295290, "AWATER": 0, "INTPTLAT": "+38.9584945", "INTPTLON": "-076.9977787" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -76.993904, 38.959025 ], [ -76.992681, 38.958074 ], [ -76.993904, 38.958074 ], [ -76.993904, 38.959025 ] ] ] } }
] }
] }
,
@@ -520,6 +520,14 @@
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 13, "x": 2341, "y": 3131 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 131072 }, "features": [
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "001004", "GEOID": "11001001004", "NAME": "10.04", "NAMELSAD": "Census Tract 10.04", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 1471925, "AWATER": 0, "INTPTLAT": "+38.9487665", "INTPTLON": "-077.0853886" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.085728, 38.960777 ], [ -77.085656, 38.960633 ], [ -77.085378, 38.960092 ], [ -77.085263, 38.959870 ], [ -77.085055, 38.959457 ], [ -77.085030, 38.959409 ], [ -77.084902, 38.959158 ], [ -77.084843, 38.959041 ], [ -77.084690, 38.958741 ], [ -77.088365, 38.958741 ], [ -77.088208, 38.958869 ], [ -77.087696, 38.959274 ], [ -77.087590, 38.959342 ], [ -77.087504, 38.959409 ], [ -77.086842, 38.959922 ], [ -77.086581, 38.960122 ], [ -77.085728, 38.960777 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "001100", "GEOID": "11001001100", "NAME": "11", "NAMELSAD": "Census Tract 11", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 1676650, "AWATER": 0, "INTPTLAT": "+38.9572432", "INTPTLON": "-077.0776732" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.079220, 38.965870 ], [ -77.079220, 38.958741 ], [ -77.084690, 38.958741 ], [ -77.084843, 38.959041 ], [ -77.084902, 38.959158 ], [ -77.085030, 38.959409 ], [ -77.085055, 38.959457 ], [ -77.085263, 38.959870 ], [ -77.085378, 38.960092 ], [ -77.085656, 38.960633 ], [ -77.085728, 38.960777 ], [ -77.085287, 38.961125 ], [ -77.084637, 38.961639 ], [ -77.084023, 38.962118 ], [ -77.083756, 38.962327 ], [ -77.082974, 38.962940 ], [ -77.082599, 38.963233 ], [ -77.082165, 38.963573 ], [ -77.080471, 38.964889 ], [ -77.080357, 38.964954 ], [ -77.080265, 38.965049 ], [ -77.080078, 38.965196 ], [ -77.079220, 38.965870 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 13, "x": 2342, "y": 3136 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 131072 }, "features": [
{ "type": "Feature", "properties": { "STATEFP": "11", "COUNTYFP": "001", "TRACTCE": "007301", "GEOID": "11001007301", "NAME": "73.01", "NAMELSAD": "Census Tract 73.01", "MTFCC": "G5020", "FUNCSTAT": "S", "ALAND": 4684643, "AWATER": 5139082, "INTPTLAT": "+38.8349280", "INTPTLON": "-077.0244450" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.035275, 38.823260 ], [ -77.035275, 38.819729 ], [ -77.036133, 38.819702 ], [ -77.039129, 38.819606 ], [ -77.039213, 38.819669 ], [ -77.039274, 38.819726 ], [ -77.039337, 38.819789 ], [ -77.039371, 38.819817 ], [ -77.039426, 38.819845 ], [ -77.039493, 38.819867 ], [ -77.039552, 38.819875 ], [ -77.039604, 38.819888 ], [ -77.039662, 38.819891 ], [ -77.039726, 38.819885 ], [ -77.039809, 38.819974 ], [ -77.039897, 38.820073 ], [ -77.039902, 38.820135 ], [ -77.039969, 38.820254 ], [ -77.039931, 38.820461 ], [ -77.039967, 38.820501 ], [ -77.039992, 38.820526 ], [ -77.040005, 38.820563 ], [ -77.040010, 38.820589 ], [ -77.040037, 38.820614 ], [ -77.040041, 38.820653 ], [ -77.040026, 38.820676 ], [ -77.039995, 38.820698 ], [ -77.039978, 38.820728 ], [ -77.039965, 38.820765 ], [ -77.039952, 38.820808 ], [ -77.039931, 38.820858 ], [ -77.039895, 38.820902 ], [ -77.039842, 38.820949 ], [ -77.039799, 38.821006 ], [ -77.039737, 38.821061 ], [ -77.039670, 38.821091 ], [ -77.039618, 38.821121 ], [ -77.039565, 38.821140 ], [ -77.039550, 38.821162 ], [ -77.039544, 38.821208 ], [ -77.039541, 38.821255 ], [ -77.039539, 38.821276 ], [ -77.039513, 38.821291 ], [ -77.039513, 38.821314 ], [ -77.039505, 38.821336 ], [ -77.039495, 38.821360 ], [ -77.039483, 38.821404 ], [ -77.039456, 38.821432 ], [ -77.039441, 38.821456 ], [ -77.039456, 38.821557 ], [ -77.039489, 38.821584 ], [ -77.039485, 38.821604 ], [ -77.039493, 38.821656 ], [ -77.039551, 38.821699 ], [ -77.039581, 38.821705 ], [ -77.039631, 38.821732 ], [ -77.039655, 38.821768 ], [ -77.039708, 38.821817 ], [ -77.039761, 38.821824 ], [ -77.039813, 38.821844 ], [ -77.039886, 38.821852 ], [ -77.039933, 38.821881 ], [ -77.040056, 38.821895 ], [ -77.040100, 38.821916 ], [ -77.040233, 38.821970 ], [ -77.040385, 38.821991 ], [ -77.040520, 38.821968 ], [ -77.040595, 38.821990 ], [ -77.040647, 38.822023 ], [ -77.040683, 38.822037 ], [ -77.040735, 38.822083 ], [ -77.040755, 38.822090 ], [ -77.040823, 38.822176 ], [ -77.040864, 38.822236 ], [ -77.040870, 38.822339 ], [ -77.040910, 38.822416 ], [ -77.040978, 38.822559 ], [ -77.040979, 38.822590 ], [ -77.040980, 38.822591 ], [ -77.040994, 38.822608 ], [ -77.041001, 38.822665 ], [ -77.041036, 38.822718 ], [ -77.041083, 38.822885 ], [ -77.041085, 38.822927 ], [ -77.041104, 38.822940 ], [ -77.041091, 38.823049 ], [ -77.041096, 38.823082 ], [ -77.041077, 38.823191 ], [ -77.041065, 38.823229 ], [ -77.041064, 38.823257 ], [ -77.041062, 38.823260 ], [ -77.035275, 38.823260 ] ] ] } }
+15 -1
View File
@@ -1648,7 +1648,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
int first_detail = detail, second_detail = detail - 1;
bool trying_to_stop_early = false;
bool can_stop_early = true;
if (additional[A_VARIABLE_DEPTH_PYRAMID]) {
if (additional[A_VARIABLE_DEPTH_PYRAMID] && mingap == 0 && minextent == 0 && mindrop_sequence == 0) {
// If we are trying to stop early, there is an extra first pass with full+extra detail,
// and which loops if everything doesn't fit rather than trying to drop or union features.
@@ -3011,7 +3011,21 @@ exit(EXIT_IMPOSSIBLE);
long long len;
struct zxy parent(z - 1, x / 2, y / 2);
bool skip = false;
if (arg->skip_children->count(parent) > 0) {
if (arg->mingap != 0 || arg->minextent != 0 || arg->mindrop_sequence != 0) {
// revive if we are trying to drop features and we still have the data
skip = false;
} else {
// skip if the parent tile finished at the last zoom level and we aren't trying to drop
skip = true;
}
} else {
// do the tile if the parent didn't finish early
skip = false;
}
if (skip) {
skip_tile(&dc, &geompos, arg->compressed);
len = 1;
} else {