Skip to content
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

Add support for node processing in second stage #2252

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

joto
Copy link
Collaborator

@joto joto commented Sep 17, 2024

This is completely analog to how way processing happens in the second stage. So from the select_relation_member() function in the Lua config file you can now also return a list of nodes that you request to process again.

Note that this will only re-process the member nodes themselves, ways which have these nodes as members are not re-processed. Also there is no way to mark member nodes of ways, only member nodes of relations. So this will allow processing, say, stop positions in public transport route relations but not, say, barriers on roads.

This change is now possible because we removed support for the old middle format which didn't allow storing the complete nodes (with tags).

-- Nodes tagged as public transport stops are imported into the 'stops' table,
-- ways tagged as highway or railway or imported into the 'lines' table. The
-- public transport routes themselves will be in the 'routes' table, but
-- without any geomtry. As a "bonus" public transport stop area relations
Copy link
Collaborator

Choose a reason for hiding this comment

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

geomtry -> geometry

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

flex-config/public-transport.lua Show resolved Hide resolved
end

function osm2pgsql.process_node(object)
-- Wer are only interested in public transport stops here, and they are
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wer -> We

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

flex-config/public-transport.lua Show resolved Hide resolved
flex-config/public-transport.lua Show resolved Hide resolved
This is completely analog to how way processing happens in the second
stage. So from the select_relation_member() function in the Lua config
file you can now also return a list of nodes that you request to process
again.

Note that this will only re-process the member nodes themselves, ways
which have these nodes as members are not re-processed. Also there is no
way to mark member nodes of ways, only member nodes of relations. So
this will allow processing, say, stop positions in public transport route
relations but not, say, barriers on roads.

This change is now possible because we removed support for the old
middle format which didn't allow storing the complete nodes (with tags).
@lonvia lonvia merged commit 9ed53e5 into osm2pgsql-dev:master Sep 18, 2024
27 checks passed
@joto joto deleted the two-stage-proc-nodes branch September 19, 2024 15:06
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