summaryrefslogtreecommitdiffstats
path: root/sci-geosciences/happycamel/files/HappyCamel-optional-correlate.diff
blob: 0b57729e4a332f43ba0001238b89eccc053d54e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff -dPNur HappyCamel.orig/cli.py HappyCamel/cli.py
--- HappyCamel.orig/cli.py	2010-01-29 09:23:25.000000000 +0100
+++ HappyCamel/cli.py	2011-08-14 09:21:16.000000000 +0200
@@ -188,6 +188,8 @@
                      help = "The number of seconds the camera's time runs before the GPS device (note that photo's and tracklogs may or may not compensate for UTC and timezone. You may need to correct this manually. Also see -r.)")
     parser.addOption("--fix-dates", var = "fix_dates", default = defaults["fix_dates"],
                      type = "bool", bool_action = True, help = "If the clock difference is known (via --calibrate or --clock-difference), shift the times in the image metadata to their proper value. Currently set to %default")
+    parser.addOption("--fix-locations", var = "fix_locations", default = defaults["fix_locations"],
+                     type = "bool", bool_action = True, help = "Correlate GPS track with image timestamps to get geolocation information. Currently set to %default")
                     
     # The options relating to interpolation
     parser.addHelpRule("\nOptions relating to interpolation of the location:")
diff -dPNur HappyCamel.orig/config.py HappyCamel/config.py
--- HappyCamel.orig/config.py	2010-01-29 09:23:25.000000000 +0100
+++ HappyCamel/config.py	2011-08-14 09:19:24.000000000 +0200
@@ -56,7 +56,8 @@
     "flickr_user"   : [str, "Flickr", "Default user", None], 
     
     # The options regarding metadata writing
-    "fix_dates": [bool, "Metadata writing", "Fix dates", False],
+    "fix_dates"    : [bool, "Metadata writing", "Fix dates", False],
+    "fix_locations": [bool, "Metadata writing", "Fix locations", False],
 
     # The options regarding interpolation
     "elevation_mode": [int,  "Interpolation", "Elevation", 1],
diff -dPNur HappyCamel.orig/main.py HappyCamel/main.py
--- HappyCamel.orig/main.py	2010-01-29 09:23:25.000000000 +0100
+++ HappyCamel/main.py	2011-08-14 09:23:51.000000000 +0200
@@ -500,6 +500,9 @@
     """ Match the photo's in photo_list to the location sources in loc_sources,
         clean up the photo list and return a list of unmatched photo's. """
 
+    if not self.conf.get("fix_locations"):
+	return []
+
     # Do the matching
     photo_list.matchTracks(loc_sources.getLocationSources(), elevation_mode,
                            max_deviation, use_outside)