Road Status after the Earthquake in Japan based on OSM
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!
I put a small example of the overlay with an OpenStreetMap map online here:
http://resultmaps.neis-one.org/japan.html
You can find further information about OpenStreetMap and the Sendai earthquake/tsunami in the OpenStreetMap Wiki. Additional information you can find in the German OpenStreetMap Blog.
I hope this overlay is useful for some people!
If you run into problems or you have questions, do not hesitate to contact me …
thx @ All OpenStreetMap contributors !!1!
thx @ University of Heidelberg for the Web Mapping Service
thx @ Frederik from The Geofabrik for the Japan OSM files
thx @ *Fab*
[Update 1. – March 18th, 2011]
Last nigth I’ve added a second layer with node barriers (barrier=*). You can used it with the following lines of code:
var osm_japan_barriers = new OpenLayers.Layer.WMS(
"Node Barriers Japan (OSM) (barrier=*)",
"http://openls.geog.uni-heidelberg.de/geoserver/wms",
{'layers':'osm_japan:barriers', transparent: "true", format: "image/png"} );
map.addLayer(osm_japan_barriers);
[Update 2. – March 21th, 2011]
I’ve added a third layer with tsunami:damage polygons (key=”tsunami:damage” ; value=”flooded”, “yes”, “scoured”, “flood”, “debris”, “debris_field” or “destroyed”). You can used it with the following lines of code:
var osm_japan_tsunami_damage = new OpenLayers.Layer.WMS(
"Tsunami Damage Japan (OSM) (tsunami:damage)",
"http://openls.geog.uni-heidelberg.de/geoserver/wms",
{'layers':'osm_japan:tsunami_damage', transparent: "true", format: "image/png"} );
map.addLayer(osm_japan_tsunami_damage);
[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);
Again, my example site can be found here: http://resultmaps.neis-one.org/japan.html