Personal tools

Geocoding images

From ActiveIDsWiki

Jump to: navigation, search
Important

This page is still in development.
Stated information might be incomplete.

Contents

Aim & workflow

The aim of this tutorial is to... Geocoding images - workflow

Tutorial requirements:

Geocoding

Geocoding, also referred to as geotagging, means the labeling of media with geographic coordinates. Or in other words saving a location into for instance a picture or video. For pictures the coordinates are saved in the Exchangeable Image File Format (EXIF) data.
Geocoding images can be done in several ways. A location can be stored into an image manually with various geotagging applications or entering the coordinates directly into the image data with an EXIF editor. However there is also geocoding software available to geotag images automatically using a geo data file. Often you will multiple techniques to geocode your images.

EXIF Data

Regardless of which method you use to geocode your images the coordinates are always stored in the Exchangeable Image File Format (EXIF) data or IPTC data of the image file. To give a background on how the location is stored into an image we will quickly examine the EXIF data of an image. For this you need to download an EXIF reader:

For this example the EXIF Reader by Ryuuji Yoshimoto is used.

Example image files

To illustrate the EXIF data the following to JPGs are used:

The images themselves look identical (see image on the right) but contain different EXIF data.

Keep EXIF data

Note: It is important to keep the original EXIF data when you convert an image, for instance when do downsize the resolution to create a smaller file size. In this original EXIF data the time of creation is stored and this timestamp is used to determine where the image was taken by cross referencing it with the geo data file later. When you don't keep the original EXIF data this creation time is overwritten with the time of the conversion and is thus no longer useful. If you change the image after it's geocoded you also need to make sure the EXIF data is kept as otherwise it could remove the stored location.

An advanced lightweight image conversion tool is IrfanView. When you use IrfanView use 'File > Save as...' and make sure the 'Show options dialog' in the bottom is checked. In the dialog window make sure 'Keep original EXIF data' and 'Keep original IPTC data' (in case you use that one to geocode) are checked as illustrated on the on the right.

Original EXIF data

EXIF data view in reader

When the original image (BasicInfo.jpg) is viewed in the EXIF Reader it shows the following data (selection):

Filename : EXIF_BasicInfo.jpg
JFIF_APP1 : Exif
 
Main Information
ImageDescription : PENTAX Image
Make : PENTAX Corporation
Model : PENTAX Optio 50
...
 
Sub Information
...
ExifVersion : 0220
DateTimeOriginal : 2008:03:01 09:33:48DateTimeDigitized : 2008:03:01 09:33:48
...

Source: EXIF BasicInfo.txt

The highlighted line in the EXIF data above states the 'DateTimeOriginal' which is the timestamp that will be used to find the coordinates of location at the location at that time recorded in the geo data file.

GPS info in EXIF data

EXIF data with GPS info view in reader

After geocoding the image (wGPSInfo.jpg) the coordinates of the location will be stored in the EXIF data and when viewed in the EXIF Reader it will now show the following data (selection):

Filename : EXIF_wGPS_Info.jpg
JFIF_APP1 : Exif
 
Main Information
ImageDescription : PENTAX Image
Make : PENTAX Corporation
Model : PENTAX Optio 50
...
 
Sub Information
...
ExifVersion : 0221
DateTimeOriginal : 2008:03:01 09:33:48
DateTimeDigitized : 2008:03:01 09:33:48
...
 
GPS InformationGPSVersionID : 2,2,0,0GPSLatitudeRef : NGPSLatitude : 30 037.1 [DMS]GPSLongitudeRef : EGPSLongitude : 31 1339.2 [DMS]GPSTimeStamp : 07:33:48GPSStatus : AGPSMapDatum : WGS-84GPSDateStamp : 2008:03:01...

Source: EXIF wGPSInfo.txt

The highlighted line in the EXIF data above state the 'GPS Information' which is added from a GPS file into the image using geocoding software. This information can be used by other applications for instance to view your image on a map positioned on the location it was taken. Note that there is a 2 hour time difference between the 'DateTimeOriginal' which was set to the local time in that time zone and the 'GPSTimeStamp' which is in UTC (GMT) time. This time difference can be adjusted for in the geocoding software.

Automatic geocoding software

(leave out?) A wide range of geotagging software is available online. ...


Locr

Locr logo

Locr is an advanced geocoding application for Windows providing an easy to use interface with all the functionality you need to automatically geotag your images. In addition Locr allows you to share and publish your geotagged images online.

This tutorial assumes the usage of Locr for Windows. Alternatively for Mac you can use HoudahGeo application, the iPhoto plugin or the Aperture plugin. locr also offers mobile solutions for Windows Mobile, Symbian and iPhone.

Workflow

To get started download and install Locr for Windows.

note: Locr offers a comprehensive online manual: GPS Photo manual (pdf).


...

RoboGEO

RoboGEO logo

RoboGEO is a lightweight image geocoding application for Windows. RoboGEO supports automatic geocoding using GPS tracklogs and waypoints in NMEA and GPX format or from the image's IPTC data, as well as multiple manual geotagging options.

Workflow

To get started download the RoboGEO software at robogeo.com. The RoboGEO Docs provide step by step instruction for all geocoding procedures.

Sony GPS Image Tracker

Sony GPS Image Tracker logo

When using the Sony GPS CS1 it is supplied with GPS Image Tracker. This program is only available for Windows. When using OSX a good alternative is GPS Photo Linker.

Workflow

  • Start GPS Image Tracker.
  • Load in your track file via "log file list..." and then "add log files...". When your CS1 is connected GPS Image Trackers should load in your log files automatically.
  • Load in your pictures via "add picture files...".
  • GPS Image Tracker populates a list of pictures with their suggested coordinates. When now corresponding time can be found a question mark will appear in front of the image name. If you think this problem occurred because the tracker was off during this period or the problem is in the synchronization you can ignore this. When all your pictures get have this problem check if the time zone settings correspond to the camera. To change the time zone settings go to "log file list...", select the log file and click "edit...".
  • Save the pictures by clicking "save all..." and that's it. Your pictures are geotagged.

Automatic geocoding scripts

For the select few that want to use scripts to geocode images for instance to use in your own application a short list:

  • EXIF-Reader.py: Python script to read GPS data from EXIF header of geotagged photos (by Oliver Heimann)
  • EXIF2KML.py: Python script to read the EXIF headers from geotagged photos and create a KML file (by Mano Marks)

What's next?

Resources