Fix a typo that broke accumulation

This commit is contained in:
Erica Fischer
2024-09-17 15:16:31 -07:00
parent 64b4a820c2
commit 060e2ee1c1
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -553,11 +553,11 @@ accumulate-test:
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep -v 'POP1950' | wc -l` == 2
# (which is the same as you get if you don't use -retain-points-multiplier when creating the tileset)
#
# the clustered and megatile-filtered POP1950s add up to 183298
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep 'tippecanoe:sum:POP1950' | sed 's/.*"tippecanoe:sum:POP1950": //' | awk '{sum += $$1} END {print sum}'` == 183298
# the clustered and megatile-filtered POP1950s add up to 146370
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep 'tippecanoe:sum:POP1950' | sed 's/.*"tippecanoe:sum:POP1950": //' | awk '{sum += $$1} END {print sum}'` == 146370
# the non-clustered but megatile-filtered POP1950s add up to 15220
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep -v 'tippecanoe:sum:POP1950' | grep POP1950 | sed 's/.*"POP1950": //' | awk '{sum += $$1} END {print sum}'` == 15220
# which does not add up to 161590 so something is wrong
# which add up to 161590 so we have the right global total
join-filter-test: tippecanoe tippecanoe-decode tile-join
# Comes out different from the direct tippecanoe run because null attributes are lost
+1 -1
View File
@@ -1228,7 +1228,7 @@ static void feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
// same attribute, we want to use that one instead of this one.
for (auto const &op : numeric_operations) {
std::string compound_key = "tipppecanoe:" + op.first + ":" + key;
std::string compound_key = "tippecanoe:" + op.first + ":" + key;
auto compound_found = keys.find(compound_key);
if (compound_found != keys.end()) {
// found, so skip this one