Skip to content

Commit

Permalink
Fix a typo that broke accumulation
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Sep 17, 2024
1 parent 64b4a82 commit 060e2ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 060e2ee

Please sign in to comment.