Sunday October 26, 2008Generating Google Maps files from GPS data - Part 2 | 10:26 am | Comment
I previously discussed my method for generating Google Maps files with a single click. Since then I have made some modifications to my GPSBabel XCSV style file. The best way to highlight these changes is to view a sample map generated with this process.
Some of the changes include:
Initially, the Google Maps HTML files I was getting from multi-day tracks were way too big and were basically grinding my browser to a halt. I used the GPSBabel simplify filter to remove extra data points which greatly reduced the resulting file size and increased performance significantly. The filter was applied as shown below:
Finding the total distance across multiple days ended up being a lot easier than I expected, thanks to a function in the Google Maps API, which resulted in this code:
All of the changes are available in the updated zip file available here. I'm having additional discussions about this GPS datalogger and my workflow over on the GpsPasSion forums (starting on page two).
Tuesday October 7, 2008Generating Google Maps files from GPS data | 12:29 am | Comment
After a trip I like to generate a Google Maps file showing the track I took during that trip. In the past this could be a tedious process, as it required me to run my GPX file that I generate with GPSBabel through yet another application (DGManager.NET), and even then, there was some HTML editing required to get things just right.
I added the following line to my original batch script to create the Google Maps file in addition to the GPX file:
With this updated script, I now have a very short workflow to take a bunch of NMEA input files and create an optimized GPX file and corresponding Google Maps HTML file for posting online.
Thursday September 25, 2008Geotagging Workflow | 9:45 pm | Comment
I have recently switched GPS data loggers from my trusty GlobalSat DG-100 to a Locosys BGT-31. The main reason for the switch was so that I could use external memory cards to store the data on long trips. I am very impressed with the BGT-31, but it isn't without its challenges. The main issue I have with it is that it either creates a binary file that you must read with their software, or you get NMEA text files. In order to minimize losses in the event of file corruption, I keep the log files to a maximum of 128KB. This can result in many files over the course of a long trip.
In order to geotag my photos from a trip I prefer to use GPicSync, which is easier to use with a single GPX input file. In order to create that single GPX file from the many individual NMEA text files, I use GPSBabel. GPSBabel is great, but there is no native way that I have found to easily select a bunch of input files from the command line, so I wanted something to automate it for me. I finally gave up finding an existing tool to do this, so I wrote a little batch script to do it for me. You can download a zip file containing the script here. Basically, here's how I use it:
Place the batch file into your GPSbabel directory (I assumed C:\Program Files\GPSbabel\). Add the registry key to your registry at "HKEY_CLASSES_ROOT\Folder\shell\Process GPS Files\command." You will now have a right-click context menu option titled "Process GPS Files" when you right-click on a folder. Right-click on the folder containing your NMEA GPS files, select the "Process GPS Files" menu option, enter your desired output filename, and hit enter. This will produce a GPX file in the parent directory of the folder you selected. Use the GPX file as input into GPicSync, and as a single backup file. You can also use the GPX file to create Google Earth KML files, or Google Maps files.
Readers' Favorite Links