Road Status after the Earthquake in Japan based on OSM

by Pascal Neis - Published: March 17th, 2011

Yesterday, Bing Maps has announced a map for Japan, which shows the “Road-Status after the Earthquake”. The information seems to be from Honda (footer: “Status of Roads provided by Honda”).

My first thought: with OpenStreetMap it is possible too!
So here we go: The Geofabrik generates hourly new files for Japan (Sendai region only). It’s available here. I have written a small script that only gets the highways out of these files and after that I imported them in a PostGIS/PostgreSQL database. Finally they are available in a Geoserver WMS/WFS.

The processing steps with its time range are:

Download OSM file from the Geofabrik Server: ca. 25sec.

Generate an *.osm file from the *.pbf with Osmosis: ca. 40sec.

Create and import WMS PostGIS table: ca. 25sec.

Overall: ca. *1min 30sec* (A cronjob is running every 30min at 20 and 50 on the hour!)

You can use the WMS Layer in your own application. If you have an OpenLayers client, the following lines of code adds the overlay:var wms = new OpenLayers.Layer.WMS(
"Road Status Japan (OSM) (impassabel=yes)",
"http://openls.geog.uni-heidelberg.de/geoserver/wms",
{'layers':'osm_japan:roads', transparent: "true", format: "image/png"} );
map.addLayer(wms);

The layer has only two colors: green and red. The green color symbolizes all the roads which can be used for traffic. The red color symbolizes the roads which have an “impassable=yes”-tag in the OpenStreetMap database and which can NOT be used for traffic!

[Update 3. – March 24th, 2011]
You can now find the Honda Sanriku layer on the “Status Map after the Earthquake in Japan” too (update daily!). Further I have added some Japanese translations and a Bing Aerial layer to the site. You can use the Honda Layer with the following lines of code:var honda_sanriku = new OpenLayers.Layer.WMS(
"Honda Sanriku Layer",
"http://openls.geog.uni-heidelberg.de/geoserver/wms",
{'layers':'osm_japan:honda_sanriku', transparent: "true", format: "image/png"} );
map.addLayer(honda_sanriku);