[Talk-ht] Fw: [CrisisMappers] Haiti: road obstruction locations

Mikel Maron mikel_maron at yahoo.com
Wed Feb 3 13:52:42 GMT 2010


Nick, CrisisMappers

Below are two responses from OSM Haiti talk list on extracting obstruction information from OpenStreetMap.

If these prove too cumbersome to include in your existing workflows, Frederik has offered to include obstruction information in the current Shapefiles, or create Shapefiles that specifically list only obstructions. Let us know what would work best.

Thanks
Mikel


________________________________
From: 80n <80n80n at gmail.com>


 XAPI can be used to extract any feature type.  

The following query will create an XML file of everything tagged with barrier=obstacle in the Haiti area:

http://www.informationfreeway.org/api/0.6/*[bbox=-75,17.5,-71,20.2][barrier=obstacle]

Similar queries can be used for other tags impassible=yes, blocked=yes etc.

The data is normally very fresh, being just a couple of minutes behind the main OSM database.

80n


________________________________
From: Frederik Ramm <frederik at remote.org>

If you're willing and able to install and run the "osmosis" tool (wiki.openstreetmap.org/wiki/Osmosis) then, armed with the tagging info from the "Humanitarian OSM tags" page, you can create any extract you want based on a current Haiti datasaet, for example:

osmosis --rx haiti.osm --nkv keyValueList=barrier.obstacle --wx obstacles.osm

gives you a list of all (currently 168) points tagged "barrier=obstacle"  (note that the command line has a dot instead of an equal sign). To retrieve a list of all impassable roads, you'd do

osmosis --rx haiti.osm --wkv keyValueList=impassable.yes --used-node --wx impassable.osm

This is slightly different because you're asking for line features. It returns 68 results with the current OSM data.

I can also modify the shape files on tools.geofabrik.de/haiti to include this data, either bei adding an "impassable" column to the existing roads shape (and an "obstruction" column to the points shape), or by creating separate impassable_roads and obstruction shapefiles.

Lastly, if you want to be flexible and generate your own shape files, you can do that (among others) with the Ruby software "osmlib", documented here:

http://osmlib.rubyforge.org/osmlib-export/rdoc/index.html

Bye
Frederik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-ht/attachments/20100203/650f0204/attachment.html>


More information about the Talk-ht mailing list