Amy Whitehead's Research

the ecological musings of a conservation biologist


Leave a comment

Spatial troubles: Converting gps data between formats

I work a lot with spatial data which is great but it means I spend a lot of time cursing at my computer.  One of the problems with spatial data is the myriad of formats that it comes in and the intricacies of trying to read it into the variety of hardware and software available to use it.  One of the best ways I have found for navigating my way through this minefield has been drawing on the expertise of others, particularly blog posts where people have outlined potential solutions.  So I’m going to try and document some of my own solutions here.  This is partly for my own benefit, so I don’t have to reinvent the wheel every time I do something, but it would also be great to get feedback from those out in the blogosphere.  So I welcome your comments and suggestions.

I’m currently working with Adélie penguins at Cape Bird on Ross Island in Antarctica. Part of this work involves monitoring the nests of banded birds, where each nest is labelled with a numbered tag.  This is a great system except that the band numbers are not the same as the numbers on the tags and you can’t read the tags after a few weeks anyway as they get covered in penguin poo.  So we quite often need to use a gps to find and identify which nest we are looking at.

Banded Adelie penguin on a marked nest

A banded Adelie penguin with a satellite tag that it will wear for one foraging trip of 1-3 days. Note the yellow nest tag in front of the nest already partially covered in poo.

Our nest location data is entered manually from the gps into a FoxPro database (not the most efficient system) and then can be extracted again as a text file.  Our biggest problem is sharing data between multiple researchers in the field who use different gps units.  Which means converting our basic text file into multiple formats, which can be a trying exercise.

My goal was to find an efficient way of creating a file where the waypoints are labelled by nest number and the band number of the associated bird listed in the comments so we could cross-reference and make sure we were reading the poopy nest tag correctly.  And then convert this file to the appropriate file types needed for each of our gps units.

So I was pleased to discover GPSBabel, a free piece of software for converting gps data between multiple formats.  It took me a wee while to navigate my way around and figure out what I needed to do but now that I have figured it out, it is a very simple process using the Universal CSV option.

Converting spatial data from text file to gdb

1.  Open the text file in Excel (or your favourite spreadsheet program), rename the data columns using the appropriate keywords from the GPSBabel documentation (there are many more keywords listed online) and save as a .csv file.
alt =      Altitude
date =   Date (yyyy/mm/dd)
icon =    Symbol (icon) name
lat =      Latitude
lon =      Longitude
name = Waypoint name (“Shortname”)
comment = Notes

So the top few rows of my file look something like this, where name represents the nest tag number and comment is the band number of the associated bird.

lat
lon
name
comment
date
-77.25
166.37
112
04238
30/11/2012
-77.21
166.45
123
05334
14/12/2012

2.  Open GPSBabel and set the input file to your newly formatted csv file, setting the format to Universal csv with field structure in the first line.

3.  Select the appropriate output format (I’ve been mostly using Garmin MapSource – gdb), name the output file and hit apply.

One of the nice features of GPSBabel is that it will open your data in Google Maps after the conversion, which provides a nice check that everything has worked how you expected.

From here, I can open the .gdb file in Garmin’s MapSource and upload it to the gps.  And then use the same .csv input file to generate other output files suitable for upload to our other gps units.  A nice simple solution.

 

Advertisements