You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2011-12-18 16:31:20
- PeeWee32
- Member

- From: Leusden, NL
- Registered: 2010-11-28
- Posts: 1,302
- Website
How to convert OSM-data into GPX-format
I would like to convert OSM data from http://download.geofabrik.de/osm/europe/ ( extension .pbf or bz2 or shp.zip) to GPX format. I would also like to filter some elements before conversion based on OSM tagging. For example only highway=track and surface= unpaved. Is there a tool for this?
Offline
#2 2011-12-18 19:06:54
- JRA
- Member
- Registered: 2007-12-17
- Posts: 677
Re: How to convert OSM-data into GPX-format
I would try GBSBabel http://www.gpsbabel.org/htmldoc-develop … t_osm.html
Offline
#3 2011-12-18 19:29:45
- stephan75
- Member
- Registered: 2008-05-28
- Posts: 2,918
Re: How to convert OSM-data into GPX-format
for filtering, have a look at http://wiki.openstreetmap.org/wiki/Osmfilter
Offline
#4 2011-12-18 21:14:25
- PeeWee32
- Member

- From: Leusden, NL
- Registered: 2010-11-28
- Posts: 1,302
- Website
Re: How to convert OSM-data into GPX-format
I have installed GPSBabel on my W7 machine. I see a window in which I can specify input and output files. so far I have converted 1 .osm file into a .gpx file. In the given link to GPSBabel I see an example with parameters "gpsbabel -i gdb -f ways.gdb -o osm,tag="highway:motorway" -F ways.osm ".
Can these kind of things be inputted in the windows interface? If so, can someone explain how to do this?
Offline
#5 2011-12-18 22:02:14
- chris66
- Member

- From: Germany
- Registered: 2009-05-24
- Posts: 10,128
Re: How to convert OSM-data into GPX-format
The editor JOSM can also convert OSM to gpx. But of course not whole europe, that's to much data. ![]()
Mapper aus dem Münsterland.
Offline
#6 2011-12-19 08:10:51
- JRA
- Member
- Registered: 2007-12-17
- Posts: 677
Re: How to convert OSM-data into GPX-format
I have installed GPSBabel on my W7 machine. I see a window in which I can specify input and output files. so far I have converted 1 .osm file into a .gpx file. In the given link to GPSBabel I see an example with parameters "gpsbabel -i gdb -f ways.gdb -o osm,tag="highway:motorway" -F ways.osm ".
Can these kind of things be inputted in the windows interface? If so, can someone explain how to do this?
In the GPSBabel GUI the Options button shows the parameter selection box if you have selected the OSM format first. But those parameters cannot be used for filtering the input data in OSM format. They affect only the output into OSM format so that it is possible to add automatically certain OSM tags into each node or feature. You must use other tools for filtering the OSM data.
Offline
#7 2011-12-19 17:57:36
- PeeWee32
- Member

- From: Leusden, NL
- Registered: 2010-11-28
- Posts: 1,302
- Website
Re: How to convert OSM-data into GPX-format
In the GPSBabel GUI the Options button shows the parameter selection box if you have selected the OSM format first. But those parameters cannot be used for filtering the input data in OSM format. They affect only the output into OSM format so that it is possible to add automatically certain OSM tags into each node or feature. You must use other tools for filtering the OSM data.
Any suggestions?
Offline
#8 2011-12-19 21:26:04
- Marqqs
- Member
- Registered: 2011-01-01
- Posts: 724
Re: How to convert OSM-data into GPX-format
JRA wrote:In the GPSBabel GUI the Options button shows the parameter selection box if you have selected the OSM format first. But those parameters cannot be used for filtering the input data in OSM format. They affect only the output into OSM format so that it is possible to add automatically certain OSM tags into each node or feature. You must use other tools for filtering the OSM data.
Any suggestions?
As stephan75 wrote above, osmfilter might be useful for this purpose. You also could use Osmosis for filtering. An osmfilter example:
osmconvert my_osm_file.pbf -o=my_osm_file.o5m
osmfilter my_osm_file.o5m --keep="highway=motorway" -o=motorways.osmOffline
#9 2011-12-21 21:37:32
- PeeWee32
- Member

- From: Leusden, NL
- Registered: 2010-11-28
- Posts: 1,302
- Website
Re: How to convert OSM-data into GPX-format
Thanks Marqqs
I've already used osmconvert to convert .osm file to o5m. I also already changed a small .osm file to .gpx with gpsbabel. Righ now osmfilter is running to make a new filtered .osm file so I hope I will eventually get what I was looking for.
Cheers Peewee
Offline
#10 2011-12-29 14:17:08
- PeeWee32
- Member

- From: Leusden, NL
- Registered: 2010-11-28
- Posts: 1,302
- Website
Re: How to convert OSM-data into GPX-format
I have managed to convert OSM data into GPX using OSMconvert, OSMfilter and finally GPSBabel. But I still have one question .
I now have a GPX file containing many routes en waypoints.
The GPSBabel command was
gpsbabel -i osm -f output.osm -o gpx -F output.gpx
This apperently produces the GPX file with the routes/waypoint. Is there a way to convert the filtered OSM file (output.osm) into a output.gpx that only has tracks (instead of routes/waypoints)?
Offline
#11 2011-12-29 14:26:38
- ajoessen
- Member
- Registered: 2009-09-16
- Posts: 2,074
Re: How to convert OSM-data into GPX-format
Is there a way to convert the filtered OSM file (output.osm) into a output.gpx that only has tracks (instead of routes/waypoints)?
Filters -> Miscellaneous
Nuke [x] Waypoints
[x] Transform Routes->Tracks [x] delete
HTH,
ajoessen
Offline
#12 2011-12-30 09:27:06
- PeeWee32
- Member

- From: Leusden, NL
- Registered: 2010-11-28
- Posts: 1,302
- Website
Re: How to convert OSM-data into GPX-format
Thanks
Works great.
Offline
#13 2016-08-14 11:19:08
- mmalgouveia
- New Member
- Registered: 2016-08-14
- Posts: 1
Re: How to convert OSM-data into GPX-format
To convert OSM to GPX I've done:
-go to the OSM and mark your track
-instal and open the program josm-tested.jar and choose:
download
choose the area which has the track you want
download
save as .gpx file
-open the .gpx file in BaseCamp and send it to the GPS
It's just another way to get it!
Offline
Pages: 1