[OSM-talk] Re: [ gpsdrive ] openstreetmap data import into GRASS

Hamish hamish_nospam at yahoo.com
Wed May 10 12:16:23 BST 2006


Hi,

I have posted a 1mb GRASS location containing the processed OSM data
at the following URL. This is from the planet-2006-05-01.osm data dump,
anything west of the Atlantic has been excluded.

  http://hamish.bowman.googlepages.com/gpsdrivefiles

Also there you will find a link to my latest osm2grass.sh script. (still
slow, but now more featureful) and some other GpsDrive backdrop creation
hints.

What we find from this is that the majority of OSM routes (aka "ways")
are actually undefined and the best we can do is to use GRASS's
v.build.polyines on the non-labeled segments* to make a single road
network of the unlabeled segments. This isn't all bad though: a) we
have enough valid routes to play with for our shortest path network
routing needs, including oneway and road class info; and b) polylines
built from untagged segments can be used as the basis for quickly
creating tagged routes (the vector end is already done: lines break at
intersections; all that's needed is a web front end to have a human
familiar with the area to check it and assign a road name).

[*] how to do 'v.overlay option=not' for two line vectors??

Running v.build.polyines on the segments only takes a few seconds. It
shows there are a lot of lines/nodes which need to be snapped together.
Smaller snaps can be done with 'v.clean tool=snap', larger ones should
be done by hand - GRASS's v.digit is good for this, as is QGIS's vector
editing tool.  (http://ggis.org)


Fun fact: After constructing polylines from the segments, we find that
there are 94031 distinct roads in the OSM dataset (east of 30W).
Of these only 4477 are labeled (routes/ways) in 6342 polylines.


have fun,
Hamish




More information about the talk mailing list