=head1 Overview
A script to auto generate basic Viking .vik files for directories containing images.
+Note that from Viking 1.3 onwards it can load geotagged images directly,
+ although it does not have recursive directory capabilities.
Simply recursively search down the directory tree (from the current location) for suitable image files
[normally jpg|JPG (probably photographs)] and then extract any location data from the EXIF part.
For each directory this info is output to a file into either Viking (default) or GPX data file formats.
Output filename is waypoints.vik (or waypoints.gpx in GPX mode) unless the -o option is specified.
+
Options:
-g put into outputting GPX file mode
-o <name> - specify output base filename (overriding 'waypoints')
Required programs:
. exiftool - getting location data from EXIF (Debian package libimage-exiftool-perl)
-Recommended programs:
-. viking - Obviously when viking mode used to view the output [can view gpx as well]
-. gpscorrelate[-gui] - Correlates digital photos with GPS data filling EXIF fields
- i.e. something to put EXIF info into files to begin with
-
Various improvements can be:
. Command line options to control things eg:
.which symbol to use for each point
my ($abs_path) = File::Spec->rel2abs("$path", "$dir");
$filename = "$abs_path/$file";
}
- return "type=\"waypoint\" latitude=\"$waypoint[0]\" longitude=\"$waypoint[2]\" name=\"$name\" altitude=\"$waypoint[4]\" comment=\"$waypoint[5]\" image=\"$filename\" symbol=\"scenic\"\n";
+ return "type=\"waypoint\" latitude=\"$waypoint[0]\" longitude=\"$waypoint[2]\" name=\"$name\" altitude=\"$waypoint[4]\" comment=\"$waypoint[5]\" image=\"$filename\" symbol=\"scenic area\"\n";
}
else {
- return "<wpt lat=\"$waypoint[0]\" lon=\"$waypoint[2]\">\n <name>$name</name>\n <ele>$waypoint[4]</ele>\n <desc>$waypoint[5]</desc>\n <sym>secenic</sym>\n</wpt>";
+ return "<wpt lat=\"$waypoint[0]\" lon=\"$waypoint[2]\">\n <name>$name</name>\n <ele>$waypoint[4]</ele>\n <desc>$waypoint[5]</desc>\n <sym>scenic area</sym>\n</wpt>";
}
}
# Default filename
my $out_file_start = "waypoints";
-if (defined @ARGV) {
+if (@ARGV) {
for (my $arg=0; $arg < $#ARGV+1; $arg++) {
if ("$ARGV[$arg]" eq "-o") {
# Set filename to next arg