Tags that influence bicycle routing

298 views
Skip to first unread message

Stefan

unread,
Nov 13, 2015, 2:16:17 AM11/13/15
to Osmand
We are working on the improvement of bicycle-related information on OSM in Chiang Mai (Thailand). We want to work especially on tags that effect bicycle routing on OSMAnd, i.e. tagging roads according to their suitability for cycling.

From here I can roughly see that the most important tags that are selected for bicycle routing in OSMAnd seem to be the following:

- bicycle [yes]
- oneway / oneway:bicycle
- highway
- maxspeed
- surface

Any other suggestions? Would be great to get a complete list of tags that are important for bicylce routing on OSMAnd ordered by their prioritiy, or someone who could explain how to read that from the source code?

Are there any plans to implement the "class:bicycle" group of tags into the OSMAnd routing?

Cheers
Stefan

Poutnik

unread,
Nov 13, 2015, 2:53:07 AM11/13/15
to osm...@googlegroups.com
OSM mapping should not be focused on any particular routing solution,
( called as undesired mapping for routing ).

It should reflect primarily the way status and state,
so consider tags regardless on if a particular router uses them or not,
or how it evaluates them.

For road and trekking bike is useful also this tags
http://wiki.openstreetmap.org/wiki/Key:smoothness

For MTB and trekking bike are useful also these tags:
http://wiki.openstreetmap.org/wiki/Key:mtb:scale
http://wiki.openstreetmap.org/wiki/Key:incline

See also the OSM tags currectly available is Brouter, a bicycle dedicated routing ( plain text )
http://brouter.de/brouter/profiles2/lookups.dat

See also my Brouter profiles info
https://github.com/poutnikl/Brouter-profiles/wiki
https://github.com/poutnikl/Brouter-profiles/wiki/Bicycle-Trekking-profiles
https://raw.githubusercontent.com/poutnikl/Brouter-profiles/master/Trekking-Dry.brf

Poutnik

Dne 13/11/2015 v 08:16 Stefan napsal(a):

Max Erickson

unread,
Nov 13, 2015, 3:03:47 PM11/13/15
to Osmand
You can see the tags used for bicycle routing here:

https://github.com/osmandapp/OsmAnd-resources/blob/master/routing/routing.xml#L420

The big one you missed is cycleway=, which is used to specify things like a dedicated bicycle lane that is part of a road:

http://wiki.openstreetmap.org/wiki/Key:cycleway

As Poutnik already said, tags shouldn't be added just to get a result in one router. On the other hand, it's no problem to focus on adding specific information that happens to make some particular software work better, just as long as the information is accurate.



Max

Poutnik

unread,
Nov 14, 2015, 7:14:36 AM11/14/15
to osm...@googlegroups.com
I would advise tagging of cycleroutes.

That are not physical structures like  Tag:highway=cycleway  nor    Key:cycleway  .   The meaning of the cycleroute is logical/statutory,  as recommended ways for bicycle,  being similarly as the hiking marks tagged so in terrains and / or in maps.

The good direct visual review of mapped cycleroutes is on Opencyclemap.org, based on OpenStreetMap.

Cycleroutes  are usually mapped in the OSM made as a way relation ( preferred ),  or as way tagging ( icn/ncn/ecn/lcn=yes, ( international/national/regional/local cyclenetwork )

 http://wiki.openstreetmap.org/wiki/Cycle_routes#Tagging_cycle_route_networks

Note that Brouter is both cycleway and cycleroute ( in both tagging ways ) aware.

Poutnik

Dne 13/11/2015 v 21:03 Max Erickson napsal(a):

Poutnik

unread,
Nov 14, 2015, 10:52:07 AM11/14/15
to Osmand
Not suere about othjer bicycling aware routers,
but Brouter profiles cannot directly test the OSM way membership in OSM relations,
but only tags of OSM ways and OSM nodes .

Therefore  Brouter author uses  pseudotags  route_bicycle_Xcn   (X= i n r l ) for the way context.
These tags do not exist in OSM, 
but are injected as way tags into Brouter routing files ED5 
during their creation from OSM data.

E.g. a particular way with the tag route_bicycle_icn=yes means 
the way is a member of international cycle-network.

Dne 14/11/2015 v 13:14 Poutnik napsal(a):

Stefan

unread,
Nov 20, 2015, 12:25:18 AM11/20/15
to Osmand
cycleroutes sound like a good idea. However, there is no designated cycle routes, cycleways etc. here. It is just roads for cars, but some roads are more frequently used by bicyclists than other roads, mostly due to less traffic. Would it make sense to tag those roads as routes, even if there is no official designation (e.g. bicycle signs)?

poutnik

unread,
Nov 20, 2015, 12:45:04 AM11/20/15
to osm...@googlegroups.com
Even tagging of recommended makes sense, e.g. lcn=proposed.
Note that in my city is lot of routes without any signs.

20. listopadu 2015 6:25:18 CET, Stefan <stefa...@googlemail.com> napsal:

--
Sent from my phone via Android email client K-9.
Please, forgive my brevity.

Pee Wee

unread,
Nov 20, 2015, 1:26:02 AM11/20/15
to Osmand
It is a good question but I would strongly advise not to tag things that can not be verified on the ground. Besides tagging these roads as being part of a non existend cycleroute is so called tagging for the router/renderer.  The best way to achieve your goal is to add tags that can be used by routers to prefer/avoid routing. Some I can think of are maxspeed = *, traffic_calming =*, surface =*, highway=traffic_signals. So try to find physical characteristics of the roads that would differentiate these and then find the appropriate tags.

if you have questions about how to tag things in OSM you might want to take a look at the OSM forum and/or subscribe to the OSM tagging mailing list.

Cheers
PeeWee32

Op vrijdag 20 november 2015 06:25:18 UTC+1 schreef Stefan:

poutnik

unread,
Nov 20, 2015, 2:19:21 AM11/20/15
to osm...@googlegroups.com
lcn = proposed is legitimate tagging, that cannot be principally verified in the terrain. My city has tens of recommended local OSM routes, that have no physical signing, aside of several signed ones.

20. listopadu 2015 7:26:01 CET, Pee Wee <piew...@gmail.com> napsal:

poutnik

unread,
Nov 20, 2015, 2:28:12 AM11/20/15
to osm...@googlegroups.com
Note that the Mentioned tagging is done by the society of the city cyclists.

20. listopadu 2015 8:19:13 CET, poutnik <poutni...@gmail.com> napsal:

Poutnik for NNTP

unread,
Nov 20, 2015, 3:23:19 AM11/20/15
to osm...@googlegroups.com
Out of city, on rural ways, or on the bad city peripheral ways,
is useful also smoothness=* and MTB_scale=*

On 11/20/2015 07:26 AM, Pee Wee wrote:
> ............................................ The best

Pee Wee

unread,
Nov 20, 2015, 5:10:49 AM11/20/15
to Osmand
Afaik  proposed in OSM means "planned . In other words .... we may expect that in due coarse the route will be signposted. It is OK to tag this in OSM  That is not the same as   a proposed (or otherwise documented) route that will never be signposted. I am not sure which type of "proposed" we are talking about here so pick the right one ;)

If you want to add the non planned/ non visible routes in OSM I suggest to seek consensus first because I know there are many that only want ground truth to be entered in OSM. Even though I know some have entered these type of (walking/cyclig) routes in OSM I am still not aware of any consensus that it is OK to add this to the database.
Another thing you should be aware of is copyright. Make sure that the author agrees that this information is entered into OSM.


PS I am aware that there are exceptions to the rule of ground truth. (adminstrative boundaries, bus routes etc.) but these exceptions have consensus, are well documented and should not be used as an excuse to add other non present things in OSM (without consensus).

 I do not know if this is in any way applicable to the situations mentioned here. I guess my message is : "Just be careful with adding info in OSM that is not legal or is likely to be removed someday by someone who does not agree. That would be a waste of energy".

Cheers
Peewee32

Paul Johnson

unread,
Nov 21, 2015, 8:37:27 AM11/21/15
to osm...@googlegroups.com
On Fri, Nov 20, 2015 at 1:19 AM, poutnik <poutni...@gmail.com> wrote:
lcn = proposed is legitimate tagging, that cannot be principally verified in the terrain. My city has tens of recommended local OSM routes, that have no physical signing, aside of several signed ones.

Proposed LCNs also have a ground truth on paper in the public record.

Poutnik

unread,
Nov 21, 2015, 9:13:41 AM11/21/15
to osm...@googlegroups.com
Dne 21/11/2015 v 14:37 Paul Johnson napsal(a):
On Fri, Nov 20, 2015 at 1:19 AM, poutnik <poutni...@gmail.com> wrote:
lcn = proposed is legitimate tagging, that cannot be principally verified in the terrain. My city has tens of recommended local OSM routes, that have no physical signing, aside of several signed ones.

Proposed LCNs also have a ground truth on paper in the public record.

They have. 

But many of the local routes have rather status  of official recommendation of the registered society of city bikers,
for the bikers to be able to review them e.g. in Opencyclemap.

I am not sure if all are really planned or not to be marked.

https://wiki.openstreetmap.org/wiki/Cyklomapa_Brna
https://wiki.openstreetmap.org/wiki/Brn%C4%9Bnsk%C3%A9_cyklotrasy

There are in the second link for the City of Brno even existing routes, i.e. not proposed, but not marked in terrain.


x
= národní, značené v terénu ( national routes, marked in terrain
Bxx
= existující, neznačené v terénu ( existing routes, not marked in terrain )
Xxxx = doporučené ( recommended )

But for practical use, IMHO, using router or not,
to know what is recommended and can be used now
has bigger value than to know than what is planned, to be used in future.

Poutnik

unread,
Nov 21, 2015, 9:24:04 AM11/21/15
to osm...@googlegroups.com
Dne 21/11/2015 v 15:13 Poutnik napsal(a):

https://wiki.openstreetmap.org/wiki/Cyklomapa_Brna
https://wiki.openstreetmap.org/wiki/Brn%C4%9Bnsk%C3%A9_cyklotrasy

There are in the second link for the City of Brno even existing routes, i.e. not proposed, but not marked in terrain.


x
= národní, značené v terénu ( national routes, marked in terrain
Bxx
= existující, neznačené v terénu ( existing routes, not marked in terrain )
Xxxx = doporučené ( recommended )
Reviewing the XML file for the route relation of the recommended X101, I see I was mistaken.
As its relation code claims really just recommended status in the relation.
https://api.openstreetmap.org/api/0.6/relation/389967
...
<tag k="complete" v="yes"/>
<tag k="lcn:description" v="neoficiální doporučená trasa"/>  //unofficial recommended route
<tag k="network" v="rcn"/>
<tag k="operator" v="cz:BrnoNaKole"/>
<tag k="ref" v="X101"/>
<tag k="route" v="bicycle"/>
<tag k="state" v="recommended"/>
<tag k="type" v="route"/>
<tag k="website" v="http://www.brnonakole.cz/"/>

Paul Johnson

unread,
Nov 21, 2015, 9:47:22 AM11/21/15
to osm...@googlegroups.com
On Sat, Nov 21, 2015 at 8:13 AM, Poutnik <poutni...@gmail.com> wrote:
Dne 21/11/2015 v 14:37 Paul Johnson napsal(a):
On Fri, Nov 20, 2015 at 1:19 AM, poutnik <poutni...@gmail.com> wrote:
lcn = proposed is legitimate tagging, that cannot be principally verified in the terrain. My city has tens of recommended local OSM routes, that have no physical signing, aside of several signed ones.

Proposed LCNs also have a ground truth on paper in the public record.

They have. 

But many of the local routes have rather status  of official recommendation of the registered society of city bikers,
for the bikers to be able to review them e.g. in Opencyclemap.

I am not sure if all are really planned or not to be marked.

If they're not really planned, and they're not signposted or otherwise designated by the applicable government agencies, then they probably shouldn't be mapped yet beyond bicycle=yes on the ways.
 
https://wiki.openstreetmap.org/wiki/Cyklomapa_Brna
https://wiki.openstreetmap.org/wiki/Brn%C4%9Bnsk%C3%A9_cyklotrasy

There are in the second link for the City of Brno even existing routes, i.e. not proposed, but not marked in terrain.

If they exist on paper beyond just a proposal, but like, actually the official routes, then I'd map them as routes (and start prodding the city to signpost them). 

Poutnik

unread,
Nov 21, 2015, 9:48:01 AM11/21/15
to osm...@googlegroups.com
Dne 21/11/2015 v 15:23 Poutnik napsal(a):
Reviewing the XML file for the route relation of the recommended X101, I see I was mistaken.
As its relation code claims really just recommended status in the relation.
https://api.openstreetmap.org/api/0.6/relation/389967
...
<tag k="complete" v="yes"/>
<tag k="lcn:description" v="neoficiální doporučená trasa"/>  //unofficial recommended route
<tag k="network" v="rcn"/>
<tag k="operator" v="cz:BrnoNaKole"/>
<tag k="ref" v="X101"/>
<tag k="route" v="bicycle"/>
<tag k="state" v="recommended"/>
<tag k="type" v="route"/>
<tag k="website" v="http://www.brnonakole.cz/"/>
Brouter translates it into way context pseudotag route_bicycle_rcn=yes
and injects it into its rd5 grid files.

Poutnik

unread,
Nov 21, 2015, 10:09:51 AM11/21/15
to osm...@googlegroups.com
Dne 21/11/2015 v 15:47 Paul Johnson napsal(a):

If they're not really planned, and they're not signposted or otherwise designated by the applicable government agencies, then they probably shouldn't be mapped yet beyond bicycle=yes on the ways.
 
If they exist on paper beyond just a proposal, but like, actually the official routes, then I'd map them as routes (and start prodding the city to signpost them).

Interesting is at https://wiki.openstreetmap.org/wiki/Relation:route#Cycle_routes_.28also_mountain_bike.29
"
state proposed (optional) Routes are sometimes not official routes, pending some negotiation or development. Maps may choose to render these routes differently, e.g. as dotted lines.

So the meaning seems rather proposed as proposed ( negotiations ) than proposed as planned ( no negotiation needed anymore ).

Stefan

unread,
Nov 24, 2015, 3:38:25 AM11/24/15
to Osmand
Following the discussion, for now, I have tagged "known" cycle routes used by many cyclists here with lcn/rcn='proposed'. These are neither officially planned nor signposted routes, but used and discussed by the local cycling community here. I think that is reference enough to start with.


If they're not really planned, and they're not signposted or otherwise designated by the applicable government agencies, then they probably shouldn't be mapped yet beyond bicycle=yes on the ways.

I think "bicycle=yes" is not sufficient, because it only refers to the legal aspect if bicycles are allowed or not on that road. But it does not say anything about the suitability for bicycles.

Stefan

Paul Johnson

unread,
Nov 24, 2015, 3:44:36 AM11/24/15
to osm...@googlegroups.com

On Tue, Nov 24, 2015 at 2:38 AM, Stefan <stefa...@googlemail.com> wrote:
I think "bicycle=yes" is not sufficient, because it only refers to the legal aspect if bicycles are allowed or not on that road. But it does not say anything about the suitability for bicycles.

Use some of the other tags Poutnik suggested in conjunction, then.

Pee Wee

unread,
Nov 24, 2015, 12:09:30 PM11/24/15
to Osmand


Op dinsdag 24 november 2015 09:38:25 UTC+1 schreef Stefan:
Following the discussion, for now, I have tagged "known" cycle routes used by many cyclists here with lcn/rcn='proposed'. These are neither officially planned nor signposted routes, but used and discussed by the local cycling community here. I think that is reference enough to start with.


Well you might think that is reference enough but my guess is that there are many in the OSM community  that think otherwise. (And yes I am one of them)  Tagging these because they are discussed in a local cycling community makes it impossible to verify ground truth for other mappers .You will also get questions like how much of an authority a local cyclist club is.  You are bound to run into some sort of dispute with other mappers.
Try to give OSM as much as possible verifiable  information so that a router  can prefer these routes.

If this does not work and you still  you still want  add the lcn/rcn to OSM I again suggest to seek consensus on the OSM  forum and/or tagging mailing list. The Osmand forum is not the place to do this since Osmand is one of many OSM based applications.

OSM works fine as long as there is consensus so please try to get this.

Cheers
PeeWee32



Paul Johnson

unread,
Nov 24, 2015, 1:50:18 PM11/24/15
to osm...@googlegroups.com
On Tue, Nov 24, 2015 at 11:09 AM, Pee Wee <piew...@gmail.com> wrote:


Op dinsdag 24 november 2015 09:38:25 UTC+1 schreef Stefan:
Following the discussion, for now, I have tagged "known" cycle routes used by many cyclists here with lcn/rcn='proposed'. These are neither officially planned nor signposted routes, but used and discussed by the local cycling community here. I think that is reference enough to start with.


Well you might think that is reference enough but my guess is that there are many in the OSM community  that think otherwise. (And yes I am one of them)  Tagging these because they are discussed in a local cycling community makes it impossible to verify ground truth for other mappers .You will also get questions like how much of an authority a local cyclist club is.  You are bound to run into some sort of dispute with other mappers.
Try to give OSM as much as possible verifiable  information so that a router  can prefer these routes.

There's also the bias problem that Strava already has with it's data aggregate available to OSM, and that's routes that are important to recreational cycling are often borderline useless for people going to the store, getting to work, and other "mundane" trips.  Compare to if highways were mapped by the routes that your local driftcar or street racing clubs cared most about to, say, the functional classification used in the US (with special cases of trunk being partly-controlled surface expressways and motorway being fully controlled freeways).
 
If this does not work and you still  you still want  add the lcn/rcn to OSM I again suggest to seek consensus on the OSM  forum and/or tagging mailing list. The Osmand forum is not the place to do this since Osmand is one of many OSM based applications.

OSM works fine as long as there is consensus so please try to get this.

At least in the US and UK, the idea of local/regional/national cycleways (and the US correspondents of city/county, state and US bike routes) has proven to be fairly consistent and uncontroversial so far.

Poutnik

unread,
Dec 3, 2015, 5:34:52 PM12/3/15
to osm...@googlegroups.com
I somehow originally missed your mentioning class:bicycle.

While current Brouter profiles do not use this tag,
it is exposed in lookups.dat BRouter file
and therefore available for profiles to be used.

Example of implementation

assign costfactor
   max 1.0 add  <expresion to determine costfactor>
                           ( if class:bicycle=-3 then 1.0 else
                            if class:bicycle=-2 then 0.5 else
                            if class:bicycle=-1 then 0.25 else
                            if class:bicycle=1 then -0.25 else
                            if class:bicycle=2 then -0.5 else
                            if class:bicycle=3 then -1.0 else
                            0  )



Dne 13/11/2015 v 08:16 Stefan napsal(a):
Reply all
Reply to author
Forward
0 new messages