Skip to content

What should nodes of a relation return? #54

@clarisma

Description

@clarisma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarifySpec is unclear about behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions