Package: gpscorrelate / 1.6.1-7

30-check-gps-tags.patch Patch series | download
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
Description: Check if GPSLatitude tag is present instead of GPSVersionID 
             when deciding whether photos already contain GPS tags, some
             cameras create GPSVersionID tags but do not include coordinates
Author: Євгеній Мещеряков <eugen@debian.org>
Last-Update: 2010-04-04

Index: gpscorrelate/exif-gps.cpp
===================================================================
--- gpscorrelate.orig/exif-gps.cpp	2010-04-04 22:48:24.646160524 +0200
+++ gpscorrelate/exif-gps.cpp	2010-04-04 22:50:10.149478790 +0200
@@ -126,13 +126,11 @@
 	strcpy(Copy, Value.c_str());
 	
 	// Check if we have GPS tags.
-	Exiv2::Exifdatum& GPSData = ExifRead["Exif.GPSInfo.GPSVersionID"];
+	Exiv2::Exifdatum& GPSData = ExifRead["Exif.GPSInfo.GPSLatitude"];
 
-	Value = GPSData.toString();
-
-	if (Value.length() == 0)
+	if (GPSData.count() < 3)
 	{
-		// No GPS data.
+		// No valid GPS data.
 		*IncludesGPS = 0;
 	} else {
 		// Seems to include GPS data...