Although the q has been asked via PM, I suppose the thread starter isn't the only one interested in the problem.
Basically, there are several things:
- Get hold of the pictures.
Image galleries at geocaching.com carry the same GUID as the cache itself. Therefore, to access spoiler images for a given cache, one has to find out the GUID, and go to
http://www.geocaching.com/seek/gallery.aspx?guid=$GUID.
Be careful, the gallery may consist of multiple pages.
Also, the gallery may contain log images - you have to decide whether you want them too, IMHO log pictures rarely provide helpful information (if they are properly understood as non-spoilers).
Extract "img.geocaching.com" <img src> URLs. Get them.
- Prepare image for geotagging.
Convert image to JPEG if in GIF or PNG format (convert).
If file doesn't contain EXIF information, add some (exif --create-exif).
- Check for, and possibly add, geotags.
Check for existing geotag (exif --ifd=GPS).
If the check didn't return anything, or a ThumbnailSize only:
Use the following commands to convert file $tmp0 into $tmp1
rm -f $tmp1
exiftool \
-q -q \
-o $tmp1 \
-makernotes:all= \
-exif:gpslatituderef="$LATR" -exif:gpslatitude=$LATV \
-exif:gpslongituderef="$LONR" -exif:gpslongitude=$LONV \
$tmp0 > /dev/null
where $LATR and $LONR are "N" or "S", or "E" or "W", respectively, and $LATV and $LONV are the _absolute_ degrees.
(- Check for success, as above.)
This all can be done in bash/awk/perl or whatever scripting language you prefer, using curl/wget or perl's WWW stuff to fetch files.
--------------------
My geo-* {patches,mirror,history} went offline Oct 1, 2010! Sorry guys...