Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.67 KB

README.md

File metadata and controls

52 lines (37 loc) · 1.67 KB

List routes from OpenStreetMap

Script and XSLT style sheet used to produce a list of relation routes found on OpenStreetMap (OSM) in Norway.

Microformatting indicates OSM keys: [ref] name, "loc_name", rt:(from-)(via-)to, #ref, nb:note, id:osm-id, *operator, /network

Instructions

Download OSM data, e.g. nightly extract from Geofabrik:

curl --silent --connect-timeout 10 \
 -z norway.osm.pbf -o norway.osm.pbf \
 http://download.geofabrik.de/osm/europe/norway.osm.pbf

Filter routes using Osmosis, but we're not interested in road networks:

osmosis --rb norway.osm.pbf \
 --tf accept-relations type=route \
 --tf reject-relations route=road \
 --tf reject-relations route=junction \
 --tf reject-relations route=detour \
 --tf reject-relations route=power \
 --tf reject-ways \
 --tf reject-nodes \
 --wx routes.osm

Apply the XSLT style sheet:

xsltproc --stringparam updated "`date -r routes.osm "+%Y-%m-%d"`" \
 routeList.xsl routes.osm > public_html/index.html

The result can be seen at http://www.vidargundersen.com/routes/


Symbols by Trafikanten, Statens Kartverk, Vegvesenet, Nicolas Mollet, Geotag Icon Project, Robert Szczepanek, Yusuke Kamiyamane.