Hamish,
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 ?
Thanks !
Moritz
[1]http://lists.osgeo.org/pipermail/grass-user/2010-January/054253.html
Hamish,
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 ?
Thanks !
Moritz
[1]http://lists.osgeo.org/pipermail/grass-user/2010-January/054253.html
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.
a web search finds these which may help:
http://www.google.co.nz/search?q=osm2shp (.shp will be lossy!)
http://svn.openstreetmap.org/applications/utils/import/ogr2osm/ogr2osm.py
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)
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.
then either v.in.ogr + OGR's GPX driver or v.in.gpsbabel's GPX.
finally "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
Hamish
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#osmbut 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