Publicado por Miguel Ángel a las 22:37
Filed under: General.
There are many posts with this title but no one like this one –this one is mine 😉
Seriously, I found valuable help in pieces of many posts regarding geotagging tools but I want to put it all together here because I know I won’t remember this all after a time. I found two approaches: the one that works beautifully every time (Linux) and the one that works beautifully when it works (Mac OS X). The latter will probably work fine for everybody else, I’m just too demanding to Mac OS X 😀
I got my GPS device for just $50 from Semsons –half its price, probably because it’s not the bleeding edge any more, who cares?– after a good reference from Petersen, who wrote the script to get the data out of it. This device doesn’t need a specific driver from its manufactor, any PL2303 USB driver will do. This driver is included in most Linux kernels and it works great, just plug it and power it on.</p
For Mac OS X you need a driver like this one. It works beautifully when it does, but when it doesn’t I end up having to reboot the laptop once or twice to get it working. In case it helps you, this is how you unload and reload the driver:
sudo kextunload /System/Library/Extensions/osx-pl2303.kext/
sudo kextload /System/Library/Extensions/osx-pl2303.kext/
The script is pretty straight forward –unless you haven’t ever used Unix-like command line– and lets you do about anything the GPS device can do: get the date from it, list all the tracks, download points in NMEA format, change the device settings (sample frecuency/interval, full-memory behavior, points format) and more stuff I don’t even know what it is for.
For geotagging photos, this is all I need: rgm3800.py -d /dev/ttyUSB0 list to list available tracks (positions recorded while the device is running) and rgm3800.py -d /dev/ttyUSB0 track 0 > 0.nmea to get first track’s points in NMEA format. Ideally I would reset the device before going out and ensure I have good batteries for the whole day (they last pretty close to the maximum 10 hours) so I would only need the first track #0. The -d /dev/ttyUSB0 option is only necessary in Linux.
Tracks in NMEA format are not accepted by photo geotagging software so they have to be translated to the GPX format. This is necessary for most photo geotagging software but gpsbabel translates GPS data across many formats.
Using the command line, just run gpsbabel -i nmea -o gpx 0.nmea 0.gpx to get data in GPX format. KML format (gpsbabel -i nmea -o kml 0.nmea 0.kml) can come in handy to preview the tracks in Google Earth to have an idea of how accurate the tracks are. There are some GUIs for the allergic to command line 😉
Once you get GPS data in GPX format you can use any photo geotagging software you like, I just tried GPSPhotoLinker for Mac OS X but still prefer gpscorrelate on Linux –should be able to compile in Mac OS X but there is no binary. I just love command line and hate dragging photos all over the place. I hate iPhoto too.
Yet before running any of these cool tools there is an important thing to find out: the time difference between the photos and GPS data. The latter is in UTC time zone but photos are usually not –not even in places in GMT/BST time zones!
Assuming a time difference of -2 hours (photos are 2 hours behind UTC) I would run gpscorrelate -g 0.gpx -z -2 *.jpg to get EXIF GPS tags added to the photos. Most of them will have interpolated (time weighted) positions but I find it failry accurate in general having set the GPS device to log position every 5 seconds.
When it comes to upload the photos to the cloud most photo share websites already take GPS EXIF tags in consideration. Panoramio and Picasa web place photos in Google Maps, it just works. However, if you use Flickr there is an option you need to modify in Privacy & Permissions on your account to get the photos automatically added to the map, this is disabled by default for the sake of geoprivacy: Import EXIF location data. You may also want to tune Who will be able to see your stuff on a map.
And then you can share maps like this one 🙂