[OSM-dev] Proposal: Make relations ordered

Frederik Ramm frederik at remote.org
Mon Mar 17 00:12:13 GMT 2008


Hi,

   at SOTM '07 I discussed relations with a lot of people, and some
said they think relation members should be ordered, like nodes are in
a way. I maintained that that was unnecessary because if need be, you
can always use the "role" to specify an order; and that's how it got
implemented.

Meanwhile I think this was short-sighted of me; in numerous
discussions people have demonstrated a need for (or at least: the
usefulness of) ordered relations.

One simple example is a bike/walking/bus route that has a little loop,
formed like those "ribbons" you often see in signatures:
   _
  < >
   X
  / \

Currently you can only specifiy the ways that are members of this, but
you cannot specify in what order you have to follow them. 

I think we should switch to ordered relations. The way I would do this
is not change anything in the XML, just add an extra "sequence" column
to the relation membership table internally. Any old client would
still work, but they'd have to be upgraded to make use of the
ordering. We would prepare the migration and the next time we have
some sort of downtime anyway, just pull it through. It would cost us a
few more bytes in storage.

Thoughts?

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'





More information about the dev mailing list