Contents:
Conversion from OpenStreetMap data
The routing data for CycleStreets is based on the maps provided by the OpenStreetMap (OSM) project.
We are very grateful to GeoFabrik for providing extracts of the planet database.
{importSummary}How CycleStreets interprets OSM data
CycleStreets bases its cycle routing on map data from OSM. The ways in OSM are described by tags, and these are interpreted as streets with various types of cycling provison.
OSM highway features
Basic interpretation of streets from the OSM highway tag
Conversion from OSM - sieving (abstraction)
Cycle Routing Tags
The following sections describe the main tags that are used to build CycleStreets routing. The usage column is a count of the number of ways with those tags after the processing described here has been applied.
Highway Tag
Defined: http://wiki.openstreetmap.org/wiki/Highway | Usage statistics
The following table has been compiled from the OSM wiki and describes the main values of the highway tag of relevance to cycle routing. It is a summary of a more detailed list which is shown at: Basic interpretation of streets from the OSM highway tag. Note the presence of highway tag on a way implies that
access=yes
.
Cycleway Tag
Defined: http://wiki.openstreetmap.org/wiki/Cycleway | Usage statistics
The following table summarizes the most common values:
{cyclewayTagHtml}Access Tag
Defined: http://wiki.openstreetmap.org/wiki/Access | Usage statistics | Access restrictions
OSM: "Use access tags to describe the allowed or preferred level of access along a footpath, road or any other kind of way element. For describing the legal accessibility of an element. Use the access=* key to describe a general access restriction (all transport modes). This may be tightened or relaxed by adding keys which describe access for more specific modes of transport. These keys each have a place in an implied tree structure in which keys become narrower in scope as they branch out from the root."
The following table summarizes how the access tag is used on OSM ways for the UK and Ireland in December 2010.
{accessTagHtml} {specialUserAccess}The access tag can be overruled by the foot or bicycle tag, see below.
Bicycle Tag
Defined: http://wiki.openstreetmap.org/wiki/Bicycle | Usage statistics
The following table summarizes how the bicycle tag is used on OSM ways for the UK and Ireland in December 2010.
{bicycleTagHtml} {specialUserBicycle}Foot Tag
Defined: http://wiki.openstreetmap.org/wiki/Key:foot | Usage statistics
The following table summarises how the foot tag is used on OSM ways for the UK and Ireland in December 2010.
{footTagHtml} {specialUserFoot}Oneway Tag
Defined: http://wiki.openstreetmap.org/wiki/Key:oneway | Usage statistics
The following table summarises how the oneway tag is used on OSM ways for the UK and Ireland in December 2010.
{onewayTagHtml} {specialUserOneway}Ways that are marked as oneway=yes
, but which also have the following tags are imported as 2-way streets, for cycling:
An example: http://www.openstreetmap.org/way/4937416
{dftTagsHtml}Process the Way tags
This page is a work in progress, and may be incomplete [Late Jan 2011].
The procedure applied to the extracted planet data is a script of SQL statements (see Conversion from OSM - sieving) and is explained below.
- Create a table (called map_wayFixed) to hold the way tags that are of interest to cycle routing.
- Create a row in the table for each way in the extracted planet data.
- Copy the original tags to the tags field.
- Fill the highway, cycleway, access, bicycle, foot, oneway fields from their respective OSM tags.
At this point the highway field has a wider range of values than the recognised values in the table above. Some of the values will be spelling mistakes, which can be corrected, and other values mean that the way is not relevant to cycle routing. The repair phase, next, narrows the range to the recognised values.
Repair
The sieving script continues with the following steps.
- Maintain the
repair table. This contains entries that record how often the fields contain unrecognised values.
- Entries in the repair table are used to provide common fixes for old or deprecated tag values, such as replacing the invalid combination:
oneway=true
withoneway=yes
. - This method is also used to ignore ways that cannot be routed over, such as replacing
cycleway=bmx_track
withhighway=ignore
.
The result of this step is that the way fields have a well defined set of values.
Implied tags
The sieving script continues by adding all of the implied tags in the highway table for the recognized fields.
Special recognition
Some special case rules are applied:
junction=roundabout
impliesoneway=yes
route=ferry
implies highway=ferryman_made=pier or jetty
implieshighway=footway
Bike routes
Defined: http://wiki.openstreetmap.org/wiki/Cycle_routes
There are various methods for marking cycle routes in OSM, either in relations or on the ways directly. The script looks for:
- Relations whose member type is way and which have:
type=route
androute=bicycle
- Ways that have
ncn_ref=*
orrcn_ref=*
orlcn_ref=*
Traffic Signals
http://wiki.openstreetmap.org/wiki/Tag:highway%3Dtraffic_signals
Nodes tagged highway=traffic_signals
are interpreted by default as a traffic light controlled junction.
Nodes tagged crossing=traffic_signals
are interpreted as traffic light controlled crossings, such as a pelican or toucan crossing.
Crossings
http://wiki.openstreetmap.org/wiki/Crossing
These are nodes tagged with highway=crossing
specify the crossing type with crossing=*
. CycleStreets does not yet [Jan 2011] make use of this information.