[OSM-talk] Speed tagging

Jon Bright jon at siliconcircus.com
Sat Aug 4 10:48:01 BST 2007

Alex Mauer wrote:
>> Way 1, W->X maxspeed=50
>> Way 2, X->Y maxspeed:hgv:a=30;maxspeed:a=50;maxspeed:b=50
>> Way 3, Y->Z maxspeed:a=30;maxspeed:b=50
> I would use "left" and right" instead of a/b, or "opposite" instead of b.

I'm going with

Way 1, W->X maxspeed=50
Way 2, X->Y hgv:maxspeed:opposite=30;maxspeed=50
Way 3, Y->Z maxspeed:opposite=30;maxspeed=50

(The segments/ways are pointing uphill, the ways in my mail are the 
"wrong" way round)

Since we already have a hgv tag elsewhere, I'll leave that hairball for 
someone else and use it.

I picked "opposite" over "left"/"right" because "opposite" only needs a 
route planner to know in what direction it wants to travel over the 
segment.  "left"/"right" needs the planner to know its direction over 
the segment *and* to know that you drive on the left/right-hand side of 
the road at this lon+lat...

I'd imagine a route planner doing something like:

  - If travelling in the direction opposite to the segment direction, 
search for "<vehicle class>:maxspeed:opposite"
  - If travelling in the direction opposite to the segment direction and 
the above tag wasn't present, search for "maxspeed:opposite"
  - If travelling in the segment direction, or if the above tags weren't 
present, search for "<vehicle class>:maxspeed"
  - If no tags yet found, search for "maxspeed"
  - If still nothing found, take some sensible default based on the 
highway class. ("sensible" depends on national boundaries, but this is 
the route planner's problem, not ours)


More information about the talk mailing list