iphoto2kml.pl

Read GPS data form EXIF of image file that placed in iPhoto album, and generate KML file.

You have to write GPS data into image file by GPSPhotoLinker in advance.

iphoto2kml.pl is a Perl scirpt. You have to install the following CPAN Modules:

Mac::Tie::PList - Parse Apple NSDictionary objects (e.g. Preference Lists)
http://search.cpan.org/~gbrock/Mac-Tie-PList-0.01/lib/Mac/Tie/PList.pm
Image::ExifTool - Read and write meta information
http://search.cpan.org/~exiftool/Image-ExifTool-6.17/lib/Image/ExifTool.pod
Download: iphoto2kml.pl
http://onohiroki.cycling.jp/archives/iphoto2kml.zip
example:
./iphoto2kml.pl --list

You can get the list of iPhoto album.

example:
   AlbumId PhotoCount AlbumName 
      8861     1340   2006-09 CycleOregon
      8862       21   2006-09-08 Portland, OR

The AlbumId of the album '2006-09-08 Portland, OR' is 8862.

usage:
iphoto2kml.pl 'AlbumId'
example:
./iphoto2kml.pl 8862 > portland.kml

You can get a KML file of AlbumId 8862. You can open the KML file with Google Earth.

usage:
iphoto2kml.pl 'AlbumId' 'path for link'
iphoto2kml.pl 'AlbumId' 'path for link' 'path of thumbnail image'
example:
./iphoto2kml.pl 8862 'http://onohiroki.cycling.jp/image/' 'http://onohiroki.cycling.jp/image/thumbnail/' > portland.kml

Generate a link to 'http://onohiroki.cycling.jp/image/DSCN3513.JPG' and use thumbnail image 'http://onohiroki.cycling.jp/image/thumbnail/DSCN3513.JPG'

If you want to upload KML file to Internet, you have to define 'path for link'.

http://onohiroki.cycling.jp/tb/tb.cgi/gps-iphoto2kml Trackback