Repository navigation
Conversation
dktue
force-pushed
the
fix/postscan-untouched
branch
from
November 16, 2026 10:58
5431148 to
330ba06
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defining a
relation_postscan_functionchanges the output even if the function does nothing. A multipolygon or boundary that is not accepted inrelation_scan_function, but is a member of an accepted relation, loses all its tags and disappears from the tiles.Cause:
postScanRelations()loops over every relation that is a member of an accepted relation, accepted or not. For a non-accepted child,relation_tags(id)usesoperator[]and inserts an empty tag map. From then onhas_relation_tags()is true, sopbf_processor.cppreads the relation with those empty tags instead of its real ones.There's also
relations_for_relation_with_parents(), which usesoperator[]onrelationsForRelationswhilepostScanRelations()is iterating that map. Every top-level parent gets inserted, and then it's visited as well (with no parents). That's why postscan runs for some un-nested relations and not others, as reported in discussion #869.Fix:
postScanRelations()skips relations with no stored tags, i.e. ones that weren't accepted.relations_for_relation_with_parents()usesfind()instead ofoperator[].docs/RELATIONS.mdsays which relations the function is called for.Tested with a synthetic file (master build vs. this PR,
--threads 1): hiking route 100 inside superroute 200, an un-nested route 300, and a lake multipolygon 400 (not accepted) that is a member of 200.way_functionnatural=water, written (5 tiles, same as without postscan)SetTagfrom parent (documented example)ParentParentMakefile unit tests pass.
🤖 Generated with Claude Code