Skip to content

Process untagged ways/relations in stage 1b/c correctly #2376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joto
Copy link
Collaborator

@joto joto commented Aug 11, 2025

When we introduced the "untagged" callbacks in bc87ea2, we did not call the process_untagged_way/relation callbacks for untagged ways/relations in stage 1b and 1c, but called the normal process_way/relation callbacks. That's not correct. So this is changed in this commit.

For stage2 processing the answer which callback to call is a bit more complicated: On first glance we should also call the "untagged" function for untagged objects. But if we call the "untagged" function in that case, we would have to implement that function and it would be called for the millions of untagged objects we are not interested in. So it is arguably better to call the normal processing functions here. After all we explicitly requested the processing function to be called with the select_relation_members() call. So we are keeping this behaviour.

When we introduced the "untagged" callbacks in
bc87ea2, we did not call the
process_untagged_way/relation callbacks for untagged ways/relations  in
stage 1b and 1c, but called the normal process_way/relation callbacks.
That's not correct. So this is changed in this commit.

For stage2 processing the answer which callback to call is a bit more
complicated: On first glance we should also call the "untagged" function
for untagged objects. But if we call the "untagged" function in that
case, we would have to implement that function and it would be called
for the millions of untagged objects we are not interested in. So it is
arguably better to call the normal processing functions here. After all
we explicitly requested the processing function to be called with the
select_relation_members() call. So we are keeping this behaviour.
@joto joto changed the title Process untagged ways/relations in stage 1c/2 correctly Process untagged ways/relations in stage 1b/c correctly Aug 11, 2025
@joto joto force-pushed the fix-untagged-later-stages branch from 80a31ce to 0f9110b Compare August 11, 2025 20:59
Copy link
Collaborator

@lonvia lonvia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really should have tests for that.


get_mutex_and_call_lua_function(m_process_way, m_way_cache.get());
get_mutex_and_call_lua_function(func, m_way_cache.get());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the code simpler (also below):

    if (func) {
        get_mutex_and_call_lua_function(func, m_way_cache.get());
    }

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants