[OSRM-talk] {highway:xxxx} in route instructions

Alessandro Pasotti apasotti at gmail.com
Thu Apr 18 14:13:07 UTC 2013


2013/4/18 Emil Tin <ZF0F at tmf.kk.dk>

>  When a way has no name, the highway tag is used next-best. The encoding
> was introduced (so far just in the bike profile) so that front-ends can
> translate way types.****
>
> ** **
>
> The encoding happen in:****
>
>
> https://github.com/DennisOSRM/Project-OSRM/blob/develop/profiles/bicycle.lua
> ****
>
> ** **
>
> ** **
>
> Example english translations done in the front end:****
>
> ** **
>
> “{highway:motorway}” = “motorway”;****
>
> “{highway:motorway_link}” = “motorway”;****
>
> “{highway:trunk}” = “trunk road”;****
>
> “{highway:trunk_link}” = “trunk road”;****
>
> “{highway:primary}” = “primary road”;****
>
> “{highway:primary_link}” = “primary road”;****
>
> “{highway:secondary}” = “road”;****
>
> “{highway:secondary_link}” = “road”;****
>
> “{highway:tertiary}” = “street”;****
>
> “{highway:tertiary_link}” = “street”;****
>
> “{highway:living_street}” = “street”;****
>
> “{highway:pedestrian}” = “pedestrian street”;****
>
> “{highway:residential}” = “residential street”;****
>
> “{highway:unclassified}” = “street”;****
>
> “{highway:service}” = “service street”;****
>
> “{highway:track}” = “track”;****
>
> “{highway:road}” = “road”;****
>
> “{highway:path}” = “path”;****
>
> “{highway:footway}” = “footway”;****
>
> “{highway:cycleway}” = “cycleway”;****
>
> “{highway:bridleway}” = “bridleway”;****
>
> “{highway:steps}” = “steps”;****
>
> “{roundabout:yes}” = “roundabout”;****
>
> “{area:yes}” = “area”;****
>
> ** **
>
> ** **
>
> Common OSM highway tag values:****
>
> http://wiki.openstreetmap.org/wiki/Key:highway****
>
> ** **
>
> You should probably have a fallback description, in case you get a tag
> value you don’t have a translation for.****
>
> ** **
>
>
>

Thanks for the clarification,

What if I want to keep the "old" behaviour ?

Can I just comment the two lines?

 like:

if "" ~= ref then
way.name = ref
elseif "" ~= name then
way.name = name
-- : else
-- way.name = "{highway:"..highway.."}"
end



-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20130418/c812590d/attachment-0001.html>


More information about the OSRM-talk mailing list