[GRASS-user] GRASS-module to import OSM-data

Brad Douglas rez at touchofmadness.com
Thu Jul 12 22:23:39 EDT 2007


On Fri, 2007-07-13 at 13:19 +1200, Hamish wrote:
> Jannis Achstetter wrote:
> > I wanted to import data from the OpenStreetMap-project to GRASS. I
> > found a bash-script written by Hamish some (long) time ago and tried
> > it that way. His script has 3 disadvantages for me:
> > - It somehow had X and Y swapped (maybe worked correctly for earlier
> > version of GRASS?)
> > - It didn't work with OSM-files written by JOSM (Files written by
> > server/API were OK)
> > - It's slow (Spawns lot of procs, used tempfiles very often)
> > So I quite rewrote the script in TCL (using similar techniques but
> > improved ;) fixing some stuff.
> > When I had the thing done, I tried to rewrite it, so it now became a
> > module for GRASS (though written in TCL).
> > The script reads the file line-by-line and stores the important stuff
> > in arrays and then imports the data as vector map using 1 polyline for
> > each way. Since TCL uses quite a bit of memory for arrays (it's not C
> > after all), you might not want to import the whole planet.osm.
> > Since this is my first module for GRASS and things can always be
> > improved, feedback is very welcome and wanted.
> > You can find the script here:
> > http://kripton.kripserver.net/software/v.in.osm
> > Written for GRASS 6.2.1, not tested for other versions.
> 
> 
> Excellent stuff Jannis. I look forward to trying it out.
> Yes, mine was a quick hack just to get it working. I was mostly
> interested in building a connected network from all the OSM segments to
> try out GRASS's v.net.* and d.path routing modules with real data.
> Hopefully OSM has standardized some on road types (dirt, residential,
> highway, etc.) since then. I remember correcting for that taking most of
> the time. I'll update my google page to list your script once I get my
> Debian upgrade finished ;)  Until then perhaps you could add it to the
> GRASS Wiki add-ons page?

I would recommend adding it to the SVN repository, but the script
requires tcsh. :(

I'd like to use OSM, but I've found it horribly lacking in both
consistency and metadata.


-- 
73, de Brad KB8UYR/6 <rez touchofmadness com>




More information about the grass-user mailing list