4

I'm using Photostream to wirelessly sync the photos on my iPhone to my computer. In time my photo collection grew bigger and bigger and since Photostream just dumps everything into one folder I'm looking for a tool that would automatically sort the entire collection into folders using this format:

YYYY-MM-GEOLOCATION

example:

2013-05-Rome

where GEOLOCATION is either the city or the region where the photo was taken. this can be gathered from the GPS information in the EXIF data of each image (just like the Places function in the Photos app on iPhone)

EXIF data GPS information

Geotagging function in the Photos app on iPhone

I'm looking for a tool that would:

  1. Create a folder structure as described above
  2. Move photos to their respective folders based on date and Geo-location information

I have found AmoK Exif Sorter but it can't interpret the GPS information in the photos. Do you know a tool that can help me do that.

1

Answer #1 Requires script writting, exiftool, and the creation of a places database.

A partial answer would use a script and exif tool.

Exiftool can read both the exif and IPTC as well as most other metadata in an image. Geolocation is part of the data it can read.

So if your photostream is in folder ~/PhotoStream (I've no idea where you keep it.)

foreach photo in ~/Photostream {
  (year,month,lat,long) = exiftool {bunch of flags} photo
  foreach placename in ~/Placenames {
    # Place name has lat, long, name, radius
    # Calculate angular distance from present lat/long to each placename
    distance = sqrt((picture_lat - place_lat)^2 + (picture_long - place_long)^2)
    if (distance < place_radius) { # found one!
      if not exists directory year-month-placename {mkdir MyPics/year-month-placename
      move file year-month-placename
    }
}

The problem with general sorting for geographical data is that it is intrinsically two dimensional. If you sort just by lat, you end up with New York City being adjacent to Rome.

The script above while not enormously difficult will take some time to get working right, mostly due to the place names.

Answer #2 Sort into folders by date, and add places manually.

I would suggest that unless your place names are fine enough grained that they change multiple times in a day. (E.g. you have separate entries for your hotel, the temples, the coliseum...) that doing a first bin by date, then rename the resulting folders manually.

I recently went through my aperture file (15000 images) and essentially did this by hand. Few of these pics have geolocation info.

A: Renamed each image in the format yyyy-mm-dd hh-mm-ss. Aperture can do this automatically.

B: Make a batch of year folders. Made a project in each one called 'unsorted'

c: Manually moved each year's pix into year folders/unsorted.

d: Make a batch of month projects in each year folder.

e: Move the pix from unsorted into appropriate month folder.

f: In some cases I would make a special project yyyy-mm-project_name where I had a large number of photos dealing with a single topic.

This didn't take as long as it sounds.

Much longer was going through each folder and applying keywords. Well worth doing.

  • Thanks for the answer. I went with option number 2, however I did this a longer time ago while I was still on Windows and I can't remember the name of the utility that helped me put a timestamp on the file names.. Thanks for the answer though! – Bogdan Jan 16 '14 at 22:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .