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

What should nodes of a relation return? #54

Open
clarisma opened this issue Feb 27, 2024 · 0 comments
Open

What should nodes of a relation return? #54

clarisma opened this issue Feb 27, 2024 · 0 comments
Labels
clarify Spec is unclear about behavior

Comments

@clarisma
Copy link
Owner

Currently, relation.nodes returns an empty set.

It may make sense to instead return a set of all nodes that make up the geometry of the relation. If so, in what order should they appear? way.nodes may contain duplicates (an ordered list rather than a set), but what would make sense for relations?

Possible use cases:

  1. Find all border crossings of a country's area relation
  2. Count the number of traffic lights encountered by a bus route
  • For case 1, an unordered set of nodes would suffice.

  • For case 2, traffic-light nodes should appear multiple times if the route traverses a segment more than once (but what about traffic lights at the end points of two connected ways? )

To stay consistent, node.nodes should then return the node itself.

@clarisma clarisma added the clarify Spec is unclear about behavior label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarify Spec is unclear about behavior
Projects
None yet
Development

No branches or pull requests

1 participant