Cycling with Handy GPS
iphoto2kml.pl
- ONO, Hiroki
- onohiroki@cup.com
- 2006-12-03
Read GPS data form EXIF of image file that placed in iPhoto album, and generate KML file.
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
- 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'.
サイクリングにハンディ GPS
iPhoto のアルバムを指定して,画像ファイルの EXIF から位置情報である GPS データを読み込んで KML ファイルを生成する事ができます. Terminal.app などでコマンドとして利用します. 以下の二つの CPAN モジュールをあらかじめインストールしておく必要があります.- 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