[GRASS-user] Re: osm import

Moritz Lennert mlennert at club.worldonline.be
Thu Apr 29 10:36:20 EDT 2010


On 29/04/10 15:37, Hamish wrote:
> Moritz wrote:
>> In a recent post [1], you said that to import OSM maps, one
>> can use v.in.ogr, but I don't see a driver for OSM maps in
>> ogr. Could you explain ?
>
> umm, probably just a dream, it was a former Summer of Code wish
> for GDAL which apparently never happened.

Yes, I saw that, too. Nice dream, though ;-)

>
> a web search finds these which may help:
>    http://www.google.co.nz/search?q=osm2shp  (.shp will be lossy!)

apparently .NET-based, don't know if it works with Mono.
But obviously the easiest is just to use the CloudMade shapefiles: 
http://downloads.cloudmade.com/

>    http://svn.openstreetmap.org/applications/utils/import/ogr2osm/ogr2osm.py

That works the other way around, i.e. ogr -> osm, or ?

> and a crappy old osm2grass script I wrote circa GRASS 6.1:
>    http://sites.google.com/site/hamishbowman/gpsdrivefiles#osm
>
> but probably your best bet is to try the v.in.gpsbabel module
> with a recent version of GpsBabel. ([to be] renamed/rewritten as
> v.in.gps in GRASS 7)

Sounds like an interesting solution. Limited to lines and points, 
though, or ? For the record, that's gpsbabel 1.3.5+

> and probably the best near-term strategy is to help verify that
> GpsBabel's import filter does not lose any data in the OSM tag
> ->  GPX attribute conversion.

I'll ask my colleagues who might use this to check.


> then either v.in.ogr + OGR's GPX driver or v.in.gpsbabel's GPX.

Why not directly v.in.gpsbabel on the osm file ?

>
> finally "osm2pgsql"

for the record: http://wiki.openstreetmap.org/wiki/Osm2pgsql

> and then connect GRASS to the PostGIS database
> might be the most robust approach. I don't know much about
> PostGIS ->  GRASS but it is something I'd like to read about on
> a GRASS wiki page :)

Well, it should be a simple v.in.ogr. There is an example on the 
v.in.ogr man page.

Thanks for the exhaustive response !
Moritz


More information about the grass-user mailing list