clarisma / geodesk-py

Fast and storage-efficient spatial database engine for OpenStreetMap data
https://docs.geodesk.com/python
GNU Lesser General Public License v3.0
36 stars 0 forks source link

What should `nodes` of a relation return? #54

Open clarisma opened 6 months ago

clarisma commented 6 months ago

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

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