[GRASS-user] Re: newbie user

Hamish hamish_b at yahoo.com
Wed May 9 23:29:11 EDT 2012


Levente wrote:
> > How can I import a *.osm file into GRASS?
...
MarkusN:
> By chance this week a new library came out:
> https://www.gaia-gis.it/fossil/readosm/home
> "ReadOSM is an open source library to extract valid data
> from within an Open Street Map input file."

see also v.in.osm and v.in.osm2 scripts from wiki addons, and an older
osm2grass.sh script there.

http://grass.osgeo.org/wiki/GRASS_AddOns#v.in.osm

Typically you'd use the java xapi interface to just download the region
and/or map features you were interested in. Depending on what you are
doing, the JOSM downloader -> Save As ... is another route.

http://openstreetmap.us/uixapi/xapi.html
http://wiki.openstreetmap.org/wiki/Xapi
http://wiki.openstreetmap.org/wiki/Josm


.osm is just an XML text file so simple to work with, gpsbabel is used as
the intermediate conversion tool for v.in.osm2. Biggest trouble perhaps
is that the tagging rules are by design rather informal & open-ended.
Things like the number of nodes per feature are more strict as a byproduct
of memory/coding limitations at the time the latest API was developed, so
a reasonable GIS should have no problem with the internals of the dataset,
just perhaps the expanse of it.


Hamish


More information about the grass-user mailing list