9

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.

mgri
  • 16,159
  • 6
  • 47
  • 80
Zery
  • 279
  • 1
  • 3
  • 13

1 Answers1

11

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.

matt wilkie
  • 28,176
  • 35
  • 147
  • 280
julien
  • 10,186
  • 6
  • 55
  • 93
  • 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 Jan 04 '12 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 Jan 09 '12 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 Jan 09 '12 at 23:43
  • 2
    I added an example batch file to loop through files in a directory – matt wilkie Feb 22 '12 at 17:51