Geotagging photos on your iOS device or desktop computer


As has been mentioned some weeks ago, it's pretty easy to record GPS information and, later, incorporate it into photos taken on a non-GPS-enabled camera.

Unfortunately, the current camera lineup doesn't really please people that would like to geotag their shots. Neither the, because of the high price-value ratio or high image quality (IQ), most popular point-and-shoot (P&S) or DSLR (including mirrorless [aka EVIL] or some lower-end [Sony] SLT) cameras have built-in GPS modules.

Some examples of the current, most popular cameras lacking any GPS support:

P&S-style "luxury" fixed-lens camera
Fuji X100

P&S high-end IQ:
Panasonic LX3/5
Canon S90/S95
(S100 will have GPS though)

P&S high price-value ratio, good IQ:
Nikon P300

DSLR:
all Canon and Nikon cameras (e.g., 600D and D5100/D7100, respectively)
all traditional Sony mirror cameras (even the latest ones; e.g., Alpha A580)
all Pentax cameras (e.g., K5)

Mirrorless, interchangeable, “serious” cameras:
all micro 4/3 cameras (Panasonic, Olympus)
all Sony NEX cameras (even the high-end and really expensive NEX-7)

Future interchangeable lens systems meant for ex-P&S users:
Nikon 1 system

There're very few cameras that do have GPS and are, currently, worth purchasing if you have the money (strictly in my opinion, of course):

Canon S100 when it hits the shelves and indeed delivers good IQ – at least as good, even at lower ISO's (which are traditionally on a bit weaker side with CMOS sensors) as the CCD-based S90/S95.

Sony Alpha A65/A77. While both cameras have their share of disadvantages (e.g., the lack of weather sealing and the inability to purchase the camera with the new, great 16-50/2.8 SSM lens on/with the A65; the price with the A77 and, compared to current top-of-the-line 16-18 Mpixel DSLR's or even mirrorless cameras like the Canon 7D or Sony's own NEX 5N, much worse high-ISO behaviour), if you can live with them, they're pretty nice.

Canon SX230 HS if you can live with the (comparatively) slow lens (because of the camera being a compact travel superzoom).

Sony's latest, high-megapixel, GPS-enabled P&S cameras are, according to the DPReview test shots, all vastly inferior to the (very few) GPS-enabled cameras listed above. Neither is Panasonic's latest GPS-enabled travel zoom, the TZ20/ZS10, any good – it's also way worse than the best GPS-enabled travel zoom, the Canon SX230 HS. (Incidentally, should you be interested in these comparisons, you may want to check out THIS for the comments, including mine.)

Unfortunately, currently (that is, before the Canon S100 hits the shelves), none of the GPS-enabled cameras are suitable for my needs (just a decent, small camera, not necessarily with interchangeable lens) and the built-in camera in my iPhone 4 is just too weak for (more) serious shots, I needed to seriously look into GPS tracking and geocoding with a separate camera and GPS tracker, preferably with iOS devices and Mac desktops. The results of my research is as follows.

Basic setup

As you've already seen, unless you go for one of the current GPS-enabled cameras (the selection is, again, very limited, particularly when it comes to quality ones), you'll need a camera and a separate GPS tracker.

The camera can be even a high(er)-end (and/or DSLR / DEVIL) one, on which you shoot into RAW files – some of the more advanced, but still free(!) GPS data synchronizer apps (e.g., GeoSetter, which will be introduced below) are capable of handling RAW files too. (This is certainly good news for people that prefer RAW to JPEG shooting.)

As a GPS tracker, you can use both your GPS recording-capable mobile device (e.g., an iPhone) or a separate GPS tracker unit. I, personally, prefer the latter because I can be absolutely sure it's working after I just switch it on, which, unfortunately, isn't granted with an iPhone or any multitasking operating system. If you start a memory-hungry application on your iPhone, the GPS logger app in the background can easily get killed by the OS. In addition, using the GPS can quite easily chew through the battery of your phone – even those of the latest models. For comparison, most GPS trackers have replaceable batteries (unlike the iPhone) and are far more battery friendly. Their batteries are, in general, quite generic, cheap ones; for example, the Nokia BL-5C also used in several of Nokia's 2003...2006 phones like the N-Gage. (Actually, I even use my old N-Gage batteries in my BTGP-38KM.) In addition most of them are really simple to use: you just turn them on and can be absolutely sure it'll keep recording your position until you switch them off. They, in addition, are generally capable of keeping GPS logs of even past weeks.

Of the GPS trackers, I've chosen BTGP-38KM (DX link; some alternatives HERE) because of the reliability and, last but not least, really friendly price. Frankly, after having used it for more than one month, I was quite surprised: I expected far worse of the tracker: far less storage to store past GPS logs (8 Mbytes capable of storing 300 hours log is pretty impressive for such a cheap tracker); far worse sensibility – basically, “what you pay for is what you get”, particularly if you take into account that other GPS loggers are generally at least twice as expensive.

Basically, you just start / stop logging by switching on / off the device and that's all – no other housekeeping is needed other than, occasionally, checking whether it still / currently logs (the green LED blinks once every one second).

It's only at transferring your log to your computer that things get a bit more complicated. Unfortunately, the CD coming with the device is almost completely useless. I've tried using it on several separate desktop computers (using the built-in (Mircrosft) BT stack in XP and Windows 7 on a HP TC1100 (native Windows machine), IBM Thinkpad t42p / Windows 7 and Parallels 6 / XP on a Mac), trying to install it with both setup.exe and setupEN.exe (the former is recommended by some users HERE). It was only on one or two occasions that the connection did work and I was able to send the device some commands (e.g., master reset to entirely clean up the built-in storage). Some users even state it only works with the provided BlueSoleil stack and nothing else – not even a newer version of the same stack.

Fortunately, this isn't really a problem if you use third-party apps to transfer GPS logs to your desktop computer. (Currently, unfortunately, you can't directly access them on an iOS device. As I'm in the process of developing some Bluetooth applications, this may change in the future.). Of them, I recommend the free GPSBabel the most.

GPSBabel

As has already been mentioned, you'll need this application to directly access the BTGP-38KM tracker – or, for that matter, any kind of Bluetooth tracker. (Not iOS-based ones, as they're able to directly export GPX files and, because of the locked-down Bluetooth support of iOS, can't in any way support the necessary Bluetooth connections.)

Note that, while GPSBabel does have an OS X version as well, I haven't made it work with the BTGP-38KM as I was unable to pair the operating system with the BT unit – OS X doesn't support BT peripherals only sporting the serial profile. While you can pair them and the device becomes selectable, I've always got the “Failed to open port (Resource busy)” error message when actively trying to access the device:


(as with many of the oversized images in this article, click the thumbnail for the original image. Note: some of the original images may be large.)

When pressing the “Apply” button in GPSBabel, even OS X itself states it has connected to the device as can be seen in this screenshot (see “BTGP-38KM” in the Devices section with bold typeface, meaning it's connected).

Nevertheless, if you have Parallels Desktop (or other PC virtualization software with BT support), you can still use it to access the device – from under Windows.

As the BTGP-38KM only supports connections over Bluetooth for both track transferring (which, in this case, we want) and, of course, working as a standalone Bluetooth GPS receiver, you'll need to connect the device to your PC first. If you use the default Microsoft BT stack on your desktop, then, this becomes pretty easy – after pairing, just check out the “COM Ports” in Bluetooth Devices (XP):



You'll need to supply the “Outgoing” port (here, COM19; also highlighted) to GPSBabel, along with the following parameters:



(All the GUI components you'll need to modify/click are annotated with a red rectangle.)

1, in the “Input” group,
a. select the “Device” radio button instead of the default “File
b. on the right, select “SkyTraq Venus based loggers (download)
c. below, in the “Device Name” list, select the outgoing port. (The app may initially select the Incoming port instead; set it explicitly to the outgoing one.)
d. below, press the “Option” button and manually enter “9600” (without the quotes) in the baud list. Make sure you also check in the checkbox as can be seen in the following screenshot:



If you forget to do this (or set the wrong value), you'll be shown a “Unsupported serial speed: 230400” message, regardless of the speed you set. Even slower-than-9600 speeds will result in the same.

Incidentally, it's here, in the same “Option” window that you can also configure full cleanup of the tracker after receiving the track (just enable the “Erase device data after download” checkbox at the top and “Disable output (useful with erase)” at the bottom.) This means you won't ever need to touch the official drivers / accessor apps coming with the device to do a full cleanup – you can do the same from GPSBabel.

2, in the “Output” group,
a. make sure “File” is selected
b. on the right, select “GPX XML” as the output format
c. below, supply your output file path (here, “C:/bada/0610.gpx”).

Finally, click the “Apply” button. After a (sometimes lengthy) process, the GPX file will be downloaded to your desktop.

Congratulations! Now, you can move on to actually embedding the GPS coordinates into your shots. Fortunately, it's also very easy. There are two apps you will want to use for this: the quite incapable but very easy-to-use GPicSync or the much more capable, but harder-to-learn GeoSetter. Both are free, Windows-only (GPicSync does have a Mac version, but it's 10.5 only and refuses to run under 10.6/10.7) and are perfect for the tasks in most (with GeoSetter and its excellent RAW handling, time offset tuning and map handling capabilities, all) cases. Note that you don't need to install any packages these apps are dependent on (EXIFTool or our old friend, GPSBabel): the apps are self-standing. Let's take a look at them in turn!

GPicSync

As has already been stated, this app is really easy-to-use. All you need to provide the directory containing the image files you'd like to handle and the path of the .gpx file (the output of GPSBabel). Unless you live in the UK (or any country using GMT), you'll also need to set the time offset in hours. If you, for example, use CET (live in Western [except for Finland] or Central Europe) and it's summer time (like now), you'll need to supply 2 to the “UTC Offset” textfield at the bottom. Finally, click the “Synchronise!” button.

A screenshot of all this (again, using a red rectangle to show the GUI components you'll need to interact with):



The original image files will be overwritten (with the original filedates kept) and a backup of them will be stored in a newly-created subdirectory called “originals-backup-1” (with new filedates).

It's THIS easy!

Now, let's turn to the much more powerful GeoSetter.

GeoSetter

You'll want to prefer this app to GPicSync in a number of cases:
- you need to work with RAW files (instead of plain JPG ones)
- you want to fine-tune the time offset, where simply setting the time difference between GMT and your local time zone is insufficient because, for example, the internal clock of your camera was several minutes late
- you want to easily spot image files not having GPS information (because, for example, they had been taken in a building where the tracker didn't record anything) and manually select a map position for these shots. With the standard Windows group selection capabilities (Shift + click), you can really easily assign GPS coordinates to not only one, but also several of these shots on a zoomable map also supporting satellite (and hybrid) view for easier identification of the places.
- you want to quickly review where each image is taken without uploading your images to any web service or transferring to your iPad / iPhone to review the files in the “Places” tab of the Photos app
- check out (in a pop-up context window displayed when hovering the cursor above the shot) the EXIF data of each image (displaying EXIF data, among other things, is impossible in the iOS version of Photos)

Note that to read images with location data already set you'll need to set the source directory in File / Settings / Startup / Initial Image Folder and, then, restart the app to start seeing the images. To set the type of the map, go to Map / Type. This is really excellent compared to iOS, where you can't, for example, enable Satellite Map instead of the default streets map. The following screenshot, for example, has been taken when displaying Satellite Map for easier identification of terrain elements in a park:


(The screenshot also shows the EXIF pop-up for the selected image on the left)

The “Places” tab of the Photos app in iOS shows an image taken at the same location after synchronizing the location-tagged images as follows:



To re-set the location data from an external file, select all images and press Ctrl+G (or click the “Synchronize geo data of selected images from GPS data files (Ctrl+G)” icon; I've annotated it, as usual, with a red rectangle in the above screenshot). Then, supply the GPS file in the uppermost text field (“Synchronize data file”) and, if there's time difference, also check in the “Take Time Zone XXX over to Taken Date” checkbox at the bottom:



Note that, as has already been stated, should be there some other time difference between the official GPS time and the camera time other than the time zone differences, you can also supply them using the “Additional Time Adjustment” group.

Doing the same under iOS

Should you want to make use of your iOS device for GPS tracking (and, possibly, image geotagging to avoid having to use apps like the above-explained GeoSetter or, for that matter, any Windows apps), you have several choices. Let's start with the former: “simple” GPS tracking, exporting the GPS track to a .GPX file and transferring it to your desktop Windows computer via e-mail, iTunes File Transfer etc. On the desktop, you can already use GeoSetter and the other apps to sync your images.

iOS apps with GPX exporting capabilities

GPS Kit
Pretty expensive ($10), but hugely popular

Trails – GPS Tracker
Some people state it's not capable of working offline. ($4)

Maps+
Simple GPX export works in the free version too (without iAP). (3$)

Let's continue with not only location tracking, but also embedding this info in the images themselves. There're several iOS apps to choose from.

iOS native apps for, in addition to recording GPS tracks, re-tagging shots on iOS

PlaceTagger

Requires a desktop-side server app – simple directory sharing isn't sufficient. ($10)

GeoLogTag

Supports shared directories, which means it doesn't require a desktop-side app, unlike the above-introduced PlaceTagger. $5.

As far as setting time difference offset (or, for that matter, time zone) before tagging is concerned, it seems neither of these two apps are capable of doing this. Both tell the user to sync the clocks of the camera and the iPhone beforehand.

They can't load GPX XML file from anywhere else either – e.g., from a dedicated tracker. GeoLogTag stores its data in a SQLite database with several tables; this means it's not that easy to convert external data to this format for it to be used to tag photos, should you, for some reason, still want to use the app for tagging. (And, of course, overwriting this file would only work on a jailbroken phone.) Note that while the 38KM records the location every 5 seconds, GeoLogTag's default is about 3 seconds, but, to converse battery life, even 3/10 etc. minutes can be set while configuring logging.

BTstack GPS and the BTGP-38KM; iOS 5

I've tested BTstack GPS (see my previous article for more info) with the BTGP-38KM in BT receiver mode, connected to both iOS 4.2.1 (a 2nd generation iPod touch) and iOS 5 GM iPad 1. Both worked flawlessly.

Note that, currently, if you install BTstack GPS on any machine, regardless of the model (an iPt report is HERE), running iOS 5 GM, the device will continuously be in “Safe mode” (unlike when you “only” jailbreak it). This is a common problem with current Cydia apps – if you install, for example, iMame4All, the same happens. Nevertheless, these apps still work; that is, if you don't use any Cydia apps adversely affected by Safe mode, you can already use these “offending” apps under the current iOS 5 beta version(s).

Also note that, when used as a connected, external Bluetooth receiver, the BTGP-38KM doesn't save the track to its internal memory, not even if you disconnect it from the client. You'll need to power down and, then, up the BTGP-38KM to (re)start logging.

Update (10/10/2011): I've played a bit with the serial support in OS X to fix the „Failed to open port (Resource busy)” error displayed by GPSBabel so that I can switch to using OS X from Parallels (Windows) to backup my track logs from my GPS tracker. Some remarks:

- the self-standing Bluetooth Serial Utility has been removed from OS X 10.4+ (as is also explained HERE). Several (older) „Using a Bluetooth GPS Receiver with GPSBabel”-type of articles (for example THIS) refer to this old app. It's no longer existing.

- Setting the BT ports has also changed over 10.4; for example, System Preferences > Bluetooth > Devices > Edit Serial ports (see THIS for a thread on the problem of the removed Bluetooth Serial Utility) no longer exists. This also means dependent tutorials won't work.

- if you set everything as needed in the OS X version of GPSBabel and click “Apply”, the GPS tracker will be connected, which, as has also been explained in the original article, you can easily check using both the taskbar icon and System Preferences > Bluetooth:



In the latter, if you click the “Advanced” button, you, nevertheless, won't be able to change the port type from “Modem” to “RS-232” as the GPS unit is not listed at all:



That is, tutorials telling you to just change the serial port type won't work either – at least with these types of BT receivers.

- Separate drivers like THIS linked from GPSBabel's docs (doc page HERE; HTML original HERE) doesn't exist any more. They MAY fix the problem – I'm not sure, as this particular driver is for another GPS tracker.

I'll continue investigating the problem along with discovering the secrets of Bluetooth programming under OS X. Wish me luck :)



UPDATE (20/10/2011 17:50CET):


a.)
when using GPSBabel to erase the contents of your GPS tracker, make sure you restart GPSBabel after downloading your full track and before, after enabling the top- and bottom-most checkboxes in Input Option, clicking the “Apply” button.

Unfortunately, the current version of GPSBabel has an annoying bug that makes it overwrite the originally supplied file. This means the file you originally saved your previous track will be mercilessly overwritten if you don't restart the app before the second step (if you don't delete the entire track right when downloading it). This happens even if you supply a new target filename – upon a successful storage cleanup operation, the previous track will be entirely overwritten by an empty one.

Unfortunately, overwrite operations like this can't be undone in typical home operating systems like Mac OS X or Windows. (Unless you backup the original track by hand or Time Machine backs it up in the background.)

Speaking of OS X and Time Machine, when I enabled it to run while Parallels Desktop 6 was running in the foreground (running XP SP3 on top of SL), I started receiving “disk unreadable” messages from Windows, which, then, became fully useless. After restarting the virtual machine, the disk image no longer could be mounted. (Physically, its size has become zero; no wonder it couldn't be read...) Dunno if this was caused by Time Machine – after that, I've never let it run while Parallels Desktop was running.

b.) speaking of “undoing” accidental file overwrites (a major problem with GPSBabel if you try to save a track into two different filenames, with different settings), let's turn to the question of recovering files (more specifically, H.264 1080p videos and photos made by the Nikon P300) from accidentally formatted FAT32 memory cards.

Some days ago, I've left my usual Sandisk MicroSD reader at work. Having lost my other one, I unboxed my USB 2.0 M2/MS/SDHC/MicroSD Card Reader and inserted my Class 4 Kingston microSD card in it (inside its SD adapter), plugged it into my Macbook Pro and continued working in Parallels, hoping OS X would just recognize the card after selecting it in the usual Parallels USB mapper screen.

I became suspicious after a while when I saw the USB mounting selector dialog again. A quick look at the card: hmm, it seems to be empty. Yes, it's been formatted by either OS X or Windows in the background (which may have been allowed by me by not noticing an operating system dialog asking whether the card can be formatted), with all my shots gone. Not having another card reader at home, I've put the card back to my P300, only to see it indeed has no images. (And re-create the DCIM directory, making recovering even harder. This has occurred to me only later, though.)

What should be done? Quickly googling for “unformat” tools revealed several solutions. I've tested the following ones:

iCare Data Recovery 4.5.2

Magic Uneraser 3.1 (Office Edition; part of Data Recovery Pack)

Power Data Recovery 6.5 (Free Edition, in Digital Media Recovery mode. I haven't tested the other modes: they may work. Or not.)

(Note that I haven't tested WinMend Data Recovery 1.3.9 because, when working at saving the contents of my card, it just crashed upon starting. Now that I'm in the process of writing this article, it seems to start just fine. Dunno why it didn't work at first.)

Neither (!) of them were able to recover most of the 30+ Mbyte videos and some of the ~4 Mbyte images from the card. GetDataBack for FAT32 was, on the other hand, worked just excellent. I've been a long-time user of another product of the same company, GetDataBack for NTFS. It has worked just great when saving the contents of an external NTFS hard disk I've changed to another, similar model of the same manufacturer while my (then-)desktop computer, an IBM Thinkpad a31p, while it was hibernated. Upon resuming the machine, it just overwrote the entire contents of the system area of the newly connected external hard disk with that of the old one. Fortunately, GetDataBack for NTFS has restored everything.

All in all, if you ever run into the problem of an accidentally formatted card, try GetDataBack for NTFS first to save you some time / frustration.


c.) the first Canon S100 cameras (see the first section of the original article) have landed in the hands of the users. Now, based on the user threads HERE
it seems it's indeed a very good camera worth purchasing if you want decent image quality and built-in GPS to avoid having to carry a separate GPS tracker and post-processing your shots after having finished shooting. (The latter can be pretty time-consuming in GeoSetter if you have several hundred, large(r) shots.)

d.)
As far as GeoSetter is concerned, I've forgotten to mention that, after importing the external GPS coordinates via Ctrl-G (or manually selecting all the positions from the map, by pinning down a pin, clicking it and, then, selecting the upper link in the bubble), you'll also need to save the changes back to the file system (Ctrl-S). Note that, should you want to keep the original filedates (the EXIF date remains intact, of course), you'll also want to tick in the “Preserve File Date and Time when Saving Changes” checkbox in File Options
:

Master your iPhone in one minute a day: Sign up here to get our FREE Tip of the Day delivered right to your inbox.

Author Details

Author Details

Werner Ruotsalainen

<p>Werner Ruotsalainen is an iOS and Java programming lecturer who is well-versed in programming, hacking, operating systems, and programming languages. Werner tries to generate unique articles on subjects not widely discussed. Some of his articles are highly technical and are intended for other programmers and coders.</p>
<p>Werner also is interested in photography and videography. He is a frequent contributor to not only mobile and computing publications, but also photo and video forums. He loves swimming, skiing, going to the gym, and using his iPads. English is one of several languages he speaks.</p>