diff -ruN image_location.orig/image_location.info image_location/image_location.info
--- image_location.orig/image_location.info	Thu Jan  1 01:00:00 1970
+++ image_location/image_location.info	Thu May 10 22:39:41 2007
@@ -0,0 +1,11 @@
+; $Id$
+name = Image Location
+description = Automatically fills in Location Latitude and Longitude fields based on Exif data.
+package = Image
+dependencies = location image
+
+
+; Information added by drupal.org packaging script on 2007-03-25
+version = "5.x-1.0"
+project = "image"
+
diff -ruN image_location.orig/image_location.module image_location/image_location.module
--- image_location.orig/image_location.module	Thu Jan  1 01:00:00 1970
+++ image_location/image_location.module	Thu May 10 22:38:49 2007
@@ -0,0 +1,88 @@
+<?php
+// $Id$
+
+/**
+ * @file image_location.module
+ * Automatically populate image.node's location latitude and longitude
+ * based on Exif tags.
+ *
+ * Copyright(c) 2006, Alexandru Badiu <http://drupal.org/user/8662>
+ * Copyright(c) 2007, Lewis Thompson <lewiz@compsoc.man.ac.uk>
+ */
+
+/**
+ * Implementation of hook_image_alter().
+ * Listen out for updates to image nodes.  On insert and update we
+ * automatically populate the latitude/longitude form fields with Exif data, if
+ * the user has not already done so.
+ * location.module handles the rest for us!
+ */
+function image_location_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
+  if (!$node->type == 'image') {
+    // node was not an image
+    return;
+  }
+
+  switch ($op) {
+    case 'insert':
+    case 'update':
+      /* $node->images is out of date as image.module calls image_insert()
+	 to move the image from the temp directory to the final location before
+	 we get a chance to read the Exif data.
+	 We always call image_load() (as opposed to just on insert) to update
+	 the $node->images array as the user could upload a replacement image.
+       */
+      image_load($node);
+
+      // qualify image filename from the _original node
+      $image = file_create_path($node->images['_original']);
+
+      /*
+       * FIXME Currently we populate *all* empty location fields.  Future work
+       * could involve being more sensible about this and populating a single
+       * field only, or a specific field.
+       */
+      foreach ($node->locations as $index => $location) {
+	// check if the user has manually entered a lat/lon
+	if (!strlen(trim($node->locations[$index]['latitude'])) && !strlen(trim($node->locations[$index]['longitude']))) {
+	  // attempt to populate locations with Exif info
+	  // Exif GPS tags: http://search.cpan.org/~exiftool/Image-ExifTool-6.90/lib/Image/ExifTool/TagNames.pod#GPS_Tags
+	  if ($exif = exif_read_data($image, 'GPS')) {
+	    if (isset($exif['GPSLatitude']) && isset($exif['GPSLongitude'])) {
+	      // FIXME Future work: proper validity checking
+	      $node->locations[$index]['latitude'] = _image_location_dms_to_dd($exif['GPSLatitude']);
+	      $node->locations[$index]['longitude'] = _image_location_dms_to_dd($exif['GPSLongitude']);
+	    }
+	  }
+	}
+      }
+    break;
+  }
+}
+
+/**
+ * Convert from Degree:Minute:Section to Decimal Degree.
+ * http://en.wikipedia.org/wiki/Geographic_coordinate_conversion#Conversion_from_DMS_to_Decimal_Degree
+ */
+function _image_location_dms_to_dd($dms) {
+  $deg = _image_location_convert_to_dec($dms[0]);
+  $min = _image_location_convert_to_dec($dms[1]);
+  $sec = _image_location_convert_to_dec($dms[2]);
+
+  return $deg + ($min / 60) + ($sec / 3600);
+}
+
+/**
+ * 'Cast' to 'float'.
+ */
+function _image_location_convert_to_dec($value) {
+  $result = "";
+
+  if (isset($value)) {
+    eval("\$result = 1.0*$value;");
+  }
+
+  return $result;
+}
+
+?>
