[OSM-talk] Route relations on cycle map
osm.list at randomjunk.co.uk
Sun Oct 28 17:10:11 GMT 2007
Following the introduction of relations people have been thinking up
uses for them. One cool use is to describe routes such as buses, road
numbering, and... cycle routes.
So, from the next re-rendering of the cycle map at
http://www.gravitystorm.co.uk/osm/ (probably by Thursday) it will
render cycle route relations.. so hopefully people can start using
The tagging scheme for the relation to be rendered is:
- network => either "ncn", "rcn", or "lcn" are currently rendered,
see the cycle map key
- (optional) ref => the reference number for the route
- (optional) state => the state of the route, "proposed" is currently
The members of the relation are the ways over which the route follows.
The ways will still need to be split in the appropriate places where
the route turns off of a road etc.
The propsals for a more generic route description  suggest adding
the following extra tags:
- type => "route"
- route => "bicycle"
These tags can be added at the mapper's discretion -- the cycle map
renderer does not currently require them, and they will not affect the
rendering in any way.
http://www.openstreetmap.org/api/0.5/relation/2716 (part of london route 5)
http://www.openstreetmap.org/api/0.5/relation/2204 (part of UK NCN route 4)
The ncn/ncn_ref/lcn/rcn tagging of ways will still be rendered too, so
no need to change anything if you don't want to (or if you use
potlatch which doesn't currently do relations).
For those interested in how the relations are being imported for
mapnik, it's just an extra python script after the osm2pgsql import
which parses the relations from the end of the planet.osm, and runs
some SQL to create new ways in the planet_osm_line table for each of
the referenced osm_id's (ie: insert into planet_osm_line (ncn_ref,way)
(select '<ref>', way from planet_osm_line where osm_id in (<relation
members>)) ). This approach may prove to have some problems, but it
seems to work for my current tests.
More information about the talk