logo separator

[mkgmap-dev] problem with highway=cycleway in default style

From Ben Konrath ben at bagu.org on Tue Jul 5 11:34:20 BST 2011

Hi everybody,

I've found a problem with the highway=cycleway in the default style.
The current setting from the default lines file is this:

highway=cycleway {add access = no; add bicycle = yes; add foot = yes}
[0x07 road_class=0 road_speed=1 resolution 23]

One small problem is that the cycleway should probably be listed as a
path or trail (0x16) instead of alley (0x07).

The bigger issue, however, is that the extra tags which are added to
highway=cycleway makes cycleways routable by car under certain
circumstances. The problem comes from the way that the access tag is
used in the style file. The access tag in OSM describes legal access
to a given highway:

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

A tag with 'access = no' means that the general public is not allowed
to go on that particular highway. Likewise, 'access = yes' means that
the general public is allowed to use that highway. And then there's
specific types of access in between yes and no for specific types of
traffic as listed on tag's wiki page.

In the default style of mkgmap, it seems that the access tag is used
to represent whether or not a particular highway type is routable by
motor vehicle. If you have have cycyleway that is tagged with 'access
= yes' - meaning the public is allowed use that cycleway - the 'add
access = no' rule will not overwrite the access rule in the OSM data
and the cycleway will be routable by motor vehicle. An example of this
can be found in Red Deer, Alberta, Canada on the Bob Johnson Trail:

http://www.openstreetmap.org/?lat=52.276167&lon=-113.804459&zoom=18&layers=MOn

To solve this problem, I've changed 'add access = no' to 'set access =
no' so that the access tag will be overwritten and cycleways will not
be routable. But this seems to be a hack because it's not really
describing the OSM data correctly. I think it would be better to use
the motor_vehicle tag to determine if a cycleway is routable by car.
The motor_vehicle tag is described on the 'access' tag's osm wiki page
above. Here's the proposed style for cycleways:

highway=cycleway {add motor_vehicle = no; set bicycle = yes; add foot
= yes} [0x16 road_class=0 road_speed=1 resolution 23]

This would prohibit motor_vehicle routing on cycleways by default if
the cycleway if the cycleway doesn't have a motor_vehicle tag. This
would also allow motor vehicle routing on cycleways that allow it as
described in this thread from last month:

http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2011q2/011771.html

We'd still have to support the OSM access tag somehow. I did a quick
grep through the mkgmap source and it seems that there isn't support
of the motor_vehicle tag. I would like to make a patch to address this
issue but I have a couple of questions first. Is the access tag used
to describe motor vehicle access in mkgmap? Does the garmin format
support the idea of public / private access separately from motor
vehicle access?

For now, I'm using the attached patch prohibit . I've change 'add
bicycle = yes' to 'set bicycle = yes' because anything tagged a
cycleway must allow bicycles by definition.

Thanks, Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkgmap-fix-cycleway.patch
Type: text/x-patch
Size: 790 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20110705/904168c2/attachment.bin 


More information about the mkgmap-dev mailing list