[Talk-us] Super-relations or not (was: Relation member_roles from Osmosis import)

Peter Budny peterb at gatech.edu
Thu Oct 28 15:51:37 BST 2010


(sorry for the crossposting, but this really applies globally, as well
as for recent discussions on the talk-us list)

Ian Dees <ian.dees at gmail.com> writes:

> On Thu, Oct 28, 2010 at 9:14 AM, Peter Budny <peterb at gatech.edu> wrote:
>
>     Jochen Topf <jochen at remote.org> writes:
>    
>     > On Wed, Oct 27, 2010 at 10:39:38AM +0200, Frank Broniewski wrote:
>     >
>     > Thats a left-over from the time when relation members were not
>     > ordered.
>    
>     Someone in another thread just told me relation members /aren't/
>     ordered, and that the ordering that, say, JOSM displays is just as a
>     tool to aid the user... not for any semantic purpose.  Which is it?
>
>  
> http://wiki.openstreetmap.org/wiki/Elements#Relation says "The ordering of
> elements within a relation is persistent. The members are returned in the
> order specified at upload. Duplicate elements will retain their specified
> order." 

Aha.  Now that's interesting.

To me, this says we really ought to be using super-relations for route
relations, rather than a single relation with roles tagged, for 2
reasons:

1) The common way, up to now, for storing routes that alternate between
single- and dual-carriageway has been to leave the single-carriageway
parts without a role, or with the role "north/south".  This makes the 
order of the members of the relation meaningless, since you
can't traverse the ways end-to-end in the specified order.

This could be solved by adding the single-carriageway sections twice
(once with "north" and once with "south"), but at that point, why not
take the extra 5 seconds and do super-relations?

2) If the direction of a road (e.g. north/south) is indicated by roles,
how do you refer to it elsewhere?  For example, if you have a
destination sign that says it goes to I-75 Northbound, and all of I-75
is in one relation with roles for "north" and "south", how do you refer
to just one direction of the road?  You can't refer to the whole
relation (because that doesn't reflect what the sign says), and there's
no clear way to refer to a role of a relation.

With super-relations, this isn't a problem... there would be a
subrelation that unambiguously refers to just the northbound or
southbound part of the road.


I really think that super-relations for routes are the way to go... all
the methods are really equivalent, but super-relations are easier to
deal with programmatically, preserve a little more information, and are
not really any more difficult for users/mappers.

If anyone has a compelling argument against super-relations, or for
single relations, I'd like to hear it.  Supporting both seems really
pointless, and I think it's about time we picked one or the other so we
can develop proper support for route relations and tools to support them
moving forward.
-- 
Peter Budny  \
Georgia Tech  \
CS PhD student \



More information about the Talk-us mailing list