[OSM-talk] Inheritance of roles in nested relations

Hugh Barnes list.osm at hughbris.com
Sat Dec 20 03:29:49 GMT 2008


I'm only just starting to play with relations.

I started to think about modularising them after Merkaartor seemed to
get flaky and the interface cumbersome when the bounding box gets large
(comprehensive feedback to that list forthcoming). These are transit

So I thought of splitting the route into legs or segments and then
creating a relation built from those relations. The added benefit would
be that the same segment can reused for many different routes.
Possibly this is a technique that's well used and terribly obvious to
many of you. I haven't seen explicit reference to it, but you know what
the search tools are like.

So it's occurred to me if I tag a role for a bus stop ("stop") in a
"child" relation, and then include that relation in the larger route
relation, does the bust stop have the role "stop" in the "parent"?


Rel1 = "segment S1 express stops"
  members: Nd1, Nd3 (bus stops, with role="stop")

Rel2 = "segment S1 local stops"
  members: Nd2, Nd4

Rel3 = "segment S1 stops" (all)
  members: Rel1, Rel2

Rel4 = "segment S1 ways"
  members: Way1, Way2

Rel5 = "segment S1"
  members: Rel3, Rel4

Rel6 = "segment S2"
  (similarly refined, or not)

Rel7 = "Bus route 73"
  members: Rel5, Rel6

Is Nd2 still a "stop" in Rel3? In Rel7? Is Way1 part of Rel7?

If you say "it's up to the client application", that's fine. I just
don't want to press ahead with technique, then someone says "that's not
what relations were for" if I complain that a relation role was not
inherited in something.

I guess I would like this inheritance endorsed as something I can rely
on (or not).

I'm not even convinced it's a good idea across all applications, but it
would certainly work for me in this case.


More information about the talk mailing list