Screen Shot 2012-11-08 at 6.49.15 AM.png
gac floorplan mockup
Screen Shot 2012-11-08 at 10.36.40 AM.png
Search Menu

Geocoding: From the streets to Adobe Bridge and then Excel (Part I)

“Telepathy” / “Pedestrian Racing” (Documentation of Work, Goodman Arts Centre, Sept 2012)

Geocoding: From Excel to TileMill (Part II)

Dark Light

This is a documentation post for my own record on how I will produce a map of 180 date points that I have collected so far. To be honest I’m not a real programmer or anything like that, so the methods used in this post might be desultory or silly. I’m helplessly flapping about here. I’d be happy to hear of what method others would use! But in the absence of any external assistance……..

So the situation thus far is that all the images I have taken have been geotagged by default in iPhone 4, and I want to pull the metadata out into csv (comma separated values) and then bring into something like TileMill where I can produce a proper map of it all.

Screen Shot 2012-11-08 at 6.49.15 AM.png
Viewing Metadata in Adobe Bridge
But first, the drudgery. I needed to batch export the filenames and gps data from all my images. Unfortunately there was no instant readymade solution for this online that I could immediately find. Like with Illustrator and Flash’s automation scripts, what I ended having to do was to write a simple Adobe Bridge script to export all the information…

To find the location for your Bridge scripts, go to Preferences > Click on “Reveal My Startup Scripts” to see the folder in Finder. I found a script on a forum and adapted it slightly (quick and dirty) to include the GPS data. Save it as a .jsx file and drop it into the Startup Scripts folder. Because Bridge is silly, you will have to close and reopen Bridge in order for the script to load – apparently you can’t load it on the fly while Bridge is open. With this script, a new menu item will appear under tools: “Export CSV file

Screen Shot 2012-11-08 at 7.09.29 AM.png
Export to CSV
For some reason, iPhone’s geodata is formatted in degrees:minutes:seconds rather than decimal degrees, and on top of that – confusingly ยบ (degree) is replaced by comma and minutes by full stop, e.g:

48,49.8N 2,22.13E

I wonder why that is so by default. I suppose I understand it but let me tell you if you just plug this into TileMill it wont be read because of the wrong delimiters and I suspect it also requires decimal degrees (DD) instead of degrees-minutes-seconds (DMS). Cue the furious googling of “HOW DOES I CONVERT DMS TO DD?”

Anyway back to the batch exporting of metadata to Excel. The data is saved in different namespaces such as the “exif” and “photoshop” data. EXIF stands for Exchangeable image file format and this is the format for the storage of metadata in files such as images and also audio files. You need to invoke the right namespace to find the right property. For example I realised that the Date Created in both exif and photoshop are different because only files that have been edited within photoshop have got a Date Created stamp (do note the property names also differ slightly in syntax although they may describe similar types of properties).

I eventually figured out which namespace the gps data resided in (EXIF). I don’t know why it isn’t more straightforward to find a reference for all these things. Anyway since we are on the topic, this is a list of standard Namespaces; from these different namespaces you can search for the properties you are looking for so you can call them up:

IPTC Core: (“Iptc4xmpCore”)
EXIF: (“exif”);
Dublin Core: (“dc”)
TIFF: (“tiff”)
XMP Basic: (“xmp”)
XMP Media Management: (“xmpMM”)
XMP Rights Management: (“xmpRights”)
XMP Basic Job Ticket: (“xmpBJ”)
XMP Paged-Text: (“xmpTPg”)
Photoshop: (“photoshop”)
Stock Photo: (“bmsp”)
Adobe PDF: (“pdf”)
Camera Raw Settings: (“crs”)
PNG: (“png” )

AND VERY IMPORTANT: Reference list of properties for the above schemas

#target bridge

if (BridgeTalk.appName == “bridge” ) {
var menu = MenuElement.create( “command”, “Export CSV File”, “at the end of Tools”);
menu.onSelect = function(m) {
try {
var tDate = new Date();
var tDay = parseInt(tDate.getMonth()+1)+’/’+tDate.getDate()+’/’+tDate.getFullYear();
var f = File.saveDialog(“Export file list to:”, “Comma delimited file:*.CSV”);
if ( !f ) { return; }“w”);
var items = app.document.visibleThumbnails;
for (var i = 0; i < items.length; ++i) {
var item = items[i];
f.writeln(tDay,’,’,,’,’,ListMetadata(item) );
} catch(e) {}

function ListMetadata(tn) {
md = tn.metadata;
md.namespace = “”;
var res = md.CreateDate;
md.namespace = “”;
res = res + ‘,’ + md.ImageWidth + ‘,’ + md.ImageLength;
md.namespace = “”;
res = res + ‘,’ + md.GPSLatitude + ‘,’ + md.GPSLongitude + ‘,’ + md.GPSAltitude + ‘,’ + md.GPSImgDirection ;
return res;

Screen Shot 2012-11-08 at 8.08.35 AM.png Data now in Excel

Related Posts