Process untagged ways/relations in stage 1b/c correctly#2376
Merged
lonvia merged 1 commit intoosm2pgsql-dev:masterfrom Aug 19, 2025
Merged
Process untagged ways/relations in stage 1b/c correctly#2376lonvia merged 1 commit intoosm2pgsql-dev:masterfrom
lonvia merged 1 commit intoosm2pgsql-dev:masterfrom
Conversation
80a31ce to
0f9110b
Compare
lonvia
reviewed
Aug 12, 2025
Collaborator
lonvia
left a comment
There was a problem hiding this comment.
We really should have tests for that.
src/output-flex.cpp
Outdated
| } | ||
|
|
||
| get_mutex_and_call_lua_function(m_process_way, m_way_cache.get()); | ||
| get_mutex_and_call_lua_function(func, m_way_cache.get()); |
Collaborator
There was a problem hiding this comment.
Can we make the code simpler (also below):
if (func) {
get_mutex_and_call_lua_function(func, m_way_cache.get());
}
1ac2376 to
12fb9d0
Compare
Collaborator
Author
|
Added tests and rebased and squashed commits. |
12fb9d0 to
67d867c
Compare
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.
67d867c to
cc6ebce
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.
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.