I need to convert a lot of garmin GDB files to GPX in order to convert it to another vector format. Is there any tools available can do a batch convert from garmin GDB files to GPX? Using MapSource allow only one file at a time.
1 Answer
You may use GPSBabel.
garmin GDB format is supported (see this page). Something like that should work:
gpsbabel -i gdb -f file.gdb -o gpx A short batch file to loop through and convert all files in a directory:
for %%f in (x:\garmin_data\*.gdb) do ( gpsbabel -i gdb -f "%%f" -o gpx -F "x:\gpx_data\%%~nf.gpx" ) The first -f is the input file and the second is the output. See here about the %%~ syntax.
- Thank you, I tried and it's a good app, unfortunately the output is in one single file, I'm hoping each gdb get converted to each gpx.Zery– Zery2012-01-04 15:40:18 +00:00Commented Jan 4, 2012 at 15:40
- 1@Zery - Sounds like you need to loop through your files one by one and call gpsbabel on each one as you go.Chad Cooper– Chad Cooper2012-01-09 16:19:16 +00:00Commented Jan 9, 2012 at 16:19
- @Chad - thank you, why don't I think of that, in fact I can even do it from inside my MapInfo using MapBasic and then just look for another source how to convert gpx to mapinfo tab programatically. Thank you.Zery– Zery2012-01-09 23:43:41 +00:00Commented Jan 9, 2012 at 23:43
- 2I added an example batch file to loop through files in a directorymatt wilkie– matt wilkie2012-02-22 17:51:29 +00:00Commented Feb 22, 2012 at 17:51