[Talk-us] Relations, cycle routes, shapefiles

john at jfeldredge.com john at jfeldredge.com
Thu Feb 3 23:37:20 GMT 2011


I know that, using relations, a particular way can be part of several different routes.  Is this also true if the ways are used directly, instead of through a relation?

-------Original Email-------
Subject :Re: [Talk-us] Relations, cycle routes, shapefiles
From  :mailto:dave at sr71.net
Date  :Thu Feb 03 17:27:02 America/Chicago 2011


On Thu, 2011-02-03 at 12:25 -0800, PJ Houser wrote:
> I have some basic questions:
> 
> 1) Why are relations preferred for bike routes?

Think of it like US highways, say US26 in Portland.  26 is at times a
motorway, but it's also carried on Clay Street downtown and Powell Blvd
on the east side.  The individual ways are Clay or Powell, but you can
represent US26 as a whole in a relation that contains _all_ of those
ways.

A bike route is the same way.  A single route might be carried on a
number of different streets, or even on a path that isn't attached to a
street.  But, as a whole, the whole path would be tied together as a
single "route", just like US26.

> 2) In the database, how do relations apply to ways? The attributes
> associated with a relation - how are they tied to ways?

They're kinda indirectly tied, just like ways.  Ways themselves don't
have a location, but they're made up of nodes that do.  To find
relations for an area, you must first find all the nodes, then all the
ways in the area.  Finally, you go see which relations refer to those
nodes and ways.  After _that_ you can go see what roles each node or way
plays in the relation.

> Will routing software use the attributes in a relation to determine if
> a way is suitable?

Yes.  We do turn restrictions in relations at the moment, and routing
software must use those.

> 3) In Portland, Oregon, we have an interconnected series of unnamed
> bike boulevards - how should we split these into relations? There are
> different tiers of bike boulevards (low traffic, middle traffic, bike
> lane, cycletrack, traffic calming devices but no bike lane, etc).
> Should we make a relation out of all connecting and similarly tiered
> ways? It'd be easier to just add attributes to the ways, but the OSM
> wiki seems quite clear on bike routes as relations.

First of all, people do both things (relations, and way tags), so good
routing software is going to have to be able to handle both.

I think a decent rule of thumb would be: if it's a single road, go ahead
and tag the ways.  If it's a number of different roads or paths, try to
use relations.

Don't worry about it too much either way.  I'd just check in here a
couple more times with what you come up with, and people can speak up if
they don't like it.

-- Dave


_______________________________________________
Talk-us mailing list
Talk-us at openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-us

-- 
John F. Eldredge -- john at jfeldredge.com
"Reserve your right to think, for even to think wrongly
is better than not to think at all." -- Hypatia of Alexandria


More information about the Talk-us mailing list