The CargoBikeIndex is computed from OSM data. It ranges from 0 (impassible) to 5 (optimal conditions for cargo bikes). For details see the OSM Wiki and our blog post.
This script expects that the OSM data is loaded into a PostGIS database. Currently, the process is split into two scripts:
- Preprocess the database with an SQL script (preprocess_osm_db.sql)
- Compute the index with an R script and write the new tag into the database (compute_cargobikeindex.R)
This will soon be integrated into a single SQL script.
Version, online on our website: V 1.0
The index is constantly being improved. The evolving versions are listed here:
| Highway | Tags | Comment | V 1.0 |
|---|---|---|---|
| general tags applicable to all highways | |||
| * | bicycle_road = yes | any street marked as bicycle road | 5 |
| * | motorroad = yes | any streets marked as motorroad | 0 |
| * | access IN (agricultural, customers, delivery, private, permit, bus, public_transport, emergency, forestry) AND bicycle NOT IN ( yes, designated, permissive, dismount) | no access for unauthorized people | 0 |
| cycleways | |||
| cycleway | default (no width specified) | 3 | |
| cycleway | width < 1.2 | 1 | |
| cycleway | 1.2 <= width < 1.6 | 3 | |
| cycleway | 1.6 <= width < 2 | 4 | |
| cycleway | width >= 2 | 5 | |
| cycleway | oneway = no AND width < 2.4 | 1 | |
| cycleway | oneway = no AND 2.4 <= width < 3.2 | 3 | |
| cycleway | oneway = no AND 3.2 <= width < 4.0 | 4 | |
| cycleway | oneway = no AND width >= 4 | 5 | |
| * | cycleway = track (no width specified) | Tag cycleway can be combined with any other highway. Tag cyleway can also be speficied through cycleway:right, cycleway:left or cycleway:both. For better readability only cylceway is written in this table. | 3 |
| cycleway = track AND cycleway:width < 1.2 | 1 | ||
| cycleway = track AND 1.2 <= cycleway:width < 1.6 | 3 | ||
| cycleway = track AND 1.6 <= cycleway:width < 2 | 4 | ||
| cycleway = track AND cycleway:width >= 2 | 5 | ||
| cycleway = track AND cycleway:oneway = no AND cycleway:width < 2.4 | Twoway cycleway track. | 1 | |
| cycleway = track AND cycleway:oneway = no AND 2.4 <= cycleway:width < 3.2 | 3 | ||
| cycleway = track AND cycleway:oneway = no AND 3.2 <= cycleway:width < 4.0 | 4 | ||
| cycleway = track AND cycleway:oneway = no AND cycleway:width >= 4 | 5 | ||
| cycleway = lane (no width specified) | Cycleway lane on the road. From a security perspective this might be less safe than a cycleway track. Though a narrow lane is better accessible for cargo bikes as they are not physically limited by the width of the track. | 4 | |
| cycleway = lane AND cycleway:width < 1.2 | 2 | ||
| cycleway = lane AND 1.2 <= cycleway:width < 1.6 | 4 | ||
| cycleway = lane AND 1.6 <= cycleway:width < 2 | 4 | ||
| cycleway = lane AND cycleway:width >= 2 | 5 | ||
| cycleway = opposite_lane | A designated cycle lane in the opposite direction of a oneway street. | 5 | |
| cycleway = opposite | A oneway street without a designated lane. Often those streets are narrow and opposite traffic is hard to pass. | 3 | |
| cycleway = shared_lane | This indicates that there is no extra cycleway, instead the street is shared with cars. | IGNORE | |
| cycleway = shared | This indicates that there is no extra cycleway, instead the street is shared with cars. | IGNORE | |
| cycleway = share_busway | 3 | ||
| cycleway = separate | This indicated that there is an extra Element in OSM which should be used instead for bicycles. | IGNORE | |
| other highway values without additional cycleway Tag | |||
| bridleway | default (bicycle not specified) | Cyclists and pedestrians not allowed on bridlways by default. | 0 |
| bicycle IN ( yes, designated, permissive) | 2 | ||
| busway | default (bicycle not specified) | Cyclists and pedestrians not allowed on busways by default. | 0 |
| bicycle IN ( yes, designated, permissive) | 3 | ||
| bus_guideway | 0 | ||
| corridor | default (bicycle not specified) | Bicycles need to be pushed. | 1 |
| bicycle IN ( yes, designated, permissive) | 2 | ||
| escape | 0 | ||
| footway | bicycle IN (NA, no, dismount) | Cyclists have to dismount, as they are not explicitly allowed. | 1 |
| footway | bicycle IN ( yes, designated, permissive) | Cyclists share the path with pedestrians. | 2 |
| footway | bicycle IN ( yes, designated, permissive) AND segretated = yes | Pedestrians and cyclists have separated ways. No further information on the cycleway is given - otherwise the above rating for cycleways apply. | 3 |
| living street | bicycle != no | 4 | |
| motorway OR motorway_link | 0 | ||
| path | default | Cyclists allowed by default. | 2 |
| bicycle IN (no, dismount) | Cyclists have to dismount. | 1 | |
| path | segregated = yes | Pedestrians and cyclists have separated ways. No further information on the cycleway is given - otherwise the above rating for cycleways apply. | 3 |
| pedestrian | bicycle IN (NA, no, dismount) | Cyclists have to dismount, as they are not explicitly allowed. | 1 |
| pedestrian | bicycle IN ( yes, designated, permissive) | Cyclists share the path with pedestrians. | 2 |
| bicycle IN ( yes, designated, permissive) AND segretated = yes | Pedestrians and cyclists have separated ways. No further information on the cycleway is given - otherwise the above rating for cycleways apply. | 3 | |
| platform | 0 | ||
| primary OR primary_link | bicycle != no | 1 | |
| proposed | 0 | ||
| residential | bicycle != no | 4 | |
| road | bicycle != no | 2 | |
| secondary OR secondary_link | bicycle != no | 2 | |
| service | bicycle != no | 2 | |
| steps | Stairs cannot be passed with cargo bikes. | 0 | |
| tertiary OR tertiary_link | bicycle != no | 3 | |
| track | default (tracktype not specified) | 1 | |
| track | bicycle IN (no, dismount) | Cyclists have to dismount. | 1 |
| track | tracktype = grade1 | 4 | |
| track | tracktype = grade2 | 3 | |
| track | tracktype = grade3 | 1 | |
| track | tracktype = grade4 | 1 | |
| track | tracktype = grade5 | 0 | |
| trunk OR trunk_link | default (bicycle not specified) | If not stated otherwise bicycles are not allowed on trunks. | 0 |
| trunk OR trunk_link | bicycle IN ( yes, designated, permissive) | 2 | |
| unclassified | bicycle != no | 2 |
| Tag | Value | V 1.0 |
|---|---|---|
| smoothness | excellent | 5 |
| good | 4 | |
| intermediate | 3 | |
| bad | 2 | |
| very bad | 1 | |
| horrible | 0 | |
| very horrible | 0 | |
| impassable | 0 | |
| if no smoothness tag is present, the surface tag is used instead | ||
| surface | paved | 4 |
| asphalt | 5 | |
| paving_stones | 4 | |
| concrete | 4 | |
| concrete:plates | 4 | |
| concrete:lanes | 2 | |
| sett | 2 | |
| cobblestone | 2 | |
| cobblestone:flattened | 2 | |
| unhewn_cobblestone | 1 | |
| unpaved | 1 | |
| compacted | 3 | |
| dirt | 1 | |
| earth | 1 | |
| fine_gravel | 2 | |
| gravel | 1 | |
| grass | 1 | |
| grass_paver | 1 | |
| gravel | 1 | |
| ground | 1 | |
| metal | 3 | |
| mud | 0 | |
| pebblestone | 1 | |
| salt | 1 | |
| sand | 0 | |
| rock | 0 | |
| wood | 1 |
Unlike road type and surface barriers do not impede passing in the best case, but they never enhance the value of a street. This sub-index therefore ranges from 0 (not passable) to 1 (easily passable for any cargo bike). A value below 1 reduces the index of a street. A value of 1 preserves the road and surface index of the street.
| Barriers | V 1.0 | |
|---|---|---|
| Barrier | ||
| cycle_barrier | 0 | |
| bollard | (no maxwidth or maxwidth:physical specified) | 0,8 |
| bollard | maxwidth OR maxwidth:physical < 0.9 m | 0 |
| bollard | maxwidth OR maxwidth:physical < 1.0 m | 0,2 |
| bollard | maxwidth OR maxwidth:physical < 1.2 m | 0,4 |
| bollard | maxwidth OR maxwidth:physical < 1.5 m | 0,8 |
| bollard | maxwidth OR maxwidth:physical >= 1.5 m | 1 |
| block | (no maxwidth or maxwidth:physical specified) | 0,8 |
| block | maxwidth OR maxwidth:physical < 0.9 m | 0 |
| block | maxwidth OR maxwidth:physical < 1.0 m | 0,2 |
| block | maxwidth OR maxwidth:physical < 1.2 m | 0,4 |
| block | maxwidth OR maxwidth:physical < 1.5 m | 0,8 |
| lift_gate | (no maxwidth or maxwidth:physical specified) | 0,8 |
| lift_gate | maxwidth OR maxwidth:physical < 0.9 m | 0 |
| lift_gate | maxwidth OR maxwidth:physical < 1.0 m | 0,2 |
| lift_gate | maxwidth OR maxwidth:physical < 1.2 m | 0,4 |
| lift_gate | maxwidth OR maxwidth:physical < 1.5 m | 0,8 |
| lift_gate | maxwidth OR maxwidth:physical >= 1.5 m | 1 |
| kerb | (no height specified) | 0,4 |
| kerb | kerb = raised | 0,2 |
| kerb | kerb = lowered | 0,6 |
| kerb | kerb = flush | 1 |
| Traffic_calming | ||
| bump | 0,6 | |
| mini_bumps | 0,6 | |
| rumble_strip | 0,6 |
use osmosis to load data into a PostgreSQL database according to this Setup.
After respective changes in the DB, create a PBF file with this command:
osmosis --read-pgsql database=DATABASE_NAME --dataset-dump --write-pbf file=OUTPUT_FILE_NAME.pbf