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

Relation member tag transform only called for member ways #791

Closed
SomeoneElseOSM opened this issue Oct 6, 2017 · 6 comments
Closed

Relation member tag transform only called for member ways #791

SomeoneElseOSM opened this issue Oct 6, 2017 · 6 comments

Comments

@SomeoneElseOSM
Copy link

(not member nodes or member relations)

I noticed this when trying to write a lua transform to do something to a node based on its relation membership, but found that everything from "pgsql_out_relation" downwards, whether in lua or C, only processes member ways.

Obviously this would be an enhancement and perhaps (to avoid breaking existing code) a new tag transform call altogether?

@lonvia
Copy link
Collaborator

lonvia commented Feb 25, 2018

osm2pgsql has no mechanisms at all at the moment to process OSM objects based on their relation membership. The processing of member ways works in the upwards direction. You can influence a relation based on its member ways ut not the other way around.

#230 discusses downwards propagation based on membership. Is that what you intend to do? Can this ticket be closed as a duplicate of that?

@SomeoneElseOSM
Copy link
Author

SomeoneElseOSM commented Feb 25, 2018

If I read #230 correctly it only addresses ways that are members of relations, not nodes that are members of relations?

The ability to change way tags based on relation membership would certainly be useful (for example it'd be great for a style to be able to render land boundaries but not maritime ones if it so wished), but what I was trying to address here was that tagtransform::filter_rel_member_tags was only called for ways, not nodes.

@lonvia
Copy link
Collaborator

lonvia commented Feb 25, 2018

Just to be clear, so you are trying to change tags of a relation based on the tags of its node members?

@SomeoneElseOSM
Copy link
Author

I'm ultimately trying to change tags on node members based on relation membership. I presume that that would need another tag transform altogether to avoid making filter_rel_member_tags incompatible with previous versions.

@lonvia
Copy link
Collaborator

lonvia commented Feb 26, 2018

That's what I understood. The mechanism for implementing that for nodes would be essentially the same as for ways in #230. I've added a comment that it might be useful for nodes too and prefer to close this ticket as a duplicate. (To be realistic though: it is unlikely that #230 will ever happen unless somebody else takes it on.)

@lonvia lonvia closed this as completed Feb 26, 2018
@SomeoneElseOSM
Copy link
Author

@lonvia Yes, that makes sense (it'll need to be a separate transform for compatibility I guess). It is something that I'm planning to look at (though with no particular urgency - I'd need to get my head around the lua-calling code first).

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

No branches or pull requests

2 participants