]> git.street.me.uk Git - andy/viking.git/blobdiff - tools/images2waypoints.pl
Replace remaining gettext calls with '_'
[andy/viking.git] / tools / images2waypoints.pl
index 212b8056eb7e0077a3501f00806172b5d1769c14..d5fa832027facc7de96f188d4346328a945e4201 100755 (executable)
@@ -20,6 +20,8 @@
 =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.
@@ -27,6 +29,7 @@ Simply recursively search down the directory tree (from the current location) fo
 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')
@@ -35,11 +38,6 @@ Options:
 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
@@ -249,10 +247,10 @@ sub My_Process_File {
                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>";
        }
 
     }
@@ -341,7 +339,7 @@ sub Process_File {
 # 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