Closed clochix closed 8 years ago
I am the user. This is my photo app version: 1.0.19 I attached the file that failed, it has gps data in included:
This is the output of identify -verbose IMG_20151011_173119.jpg|grep -i gps
exif:GPSAltitude: 297299/1000
exif:GPSAltitudeRef: 0
exif:GPSDateStamp: 2015:10:11
exif:GPSImgDirection: 352/1
exif:GPSImgDirectionRef: M
exif:GPSInfo: 629
exif:GPSLatitude: 49/1, 16/1, 40907/1000
exif:GPSLatitudeRef: N
exif:GPSLongitude: 8/1, 5/1, 29506/1000
exif:GPSLongitudeRef: E
exif:GPSMapDatum: WGS-84
exif:GPSProcessingMethod: 65, 83, 67, 73, 73, 0, 0, 0, 71, 80, 83
exif:GPSStatus: A
exif:GPSTimeStamp: 15/1, 31/1, 20000/1000
exif:GPSVersionID: 2, 2, 0, 0
Ok i found something out. I changed the code in thumb.js to: I added logging and commented the altitude part out: ... gpsDegToDec = function(pos, posRef) { var coord, ref, split, splitAlt; console.log(pos); split = pos.match(/(\d+)\/(\d+), (\d+)\/(\d+), (\d+)\/(\d+)/); ...
... orientation = data.Orientation; alt = 'exif:GPSAltitude'; lat = 'exif:GPSLatitude'; long = 'exif:GPSLongitude'; GPS = {}; console.log(data.Properties[alt]) //if (data.Properties[alt]) { // GPS.alt = gpsDegToDec(data.Properties[alt], data.Properties[alt + 'Ref']); //} console.log(data.Properties[lat]) if (data.Properties[lat]) { GPS.lat = gpsDegToDec(data.Properties[lat], data.Properties[lat + 'Ref']); } console.log(data.Properties[long]) if (data.Properties[long]) { GPS.long = gpsDegToDec(data.Properties[long], data.Properties[long + 'Ref']); }
And I got output: 297299/1000 49/1, 16/1, 40907/1000 49/1, 16/1, 40907/1000 8/1, 5/1, 29506/1000 8/1, 5/1, 29506/1000
The GPS data was imported then. Then I added console.log(posRef); to gpsDegToDec , enabled the altitude part and the output was: 297299/1000 297299/1000 0 "297299/1000" and "0" is what the altitude part transmits to gpsDegToDec as input. gpsDegToDec don't like "297299/1000" and "0". Unfortunately i do not know much about JavaScript and I know nothing about coffee script... I'm happy to have a picture on the map now :-) Nice.
Awesome! Thanks for your help, it will help us fix this quickly.
This issue should be fixed in new version (1.0.21). @alexander-n8hgeg5e , is it ok for you ?
Yes it works. :-) Only if I import from the files app, i think the gps data is not evaluated at all.
Thanks @clochix and @alexander-n8hgeg5e :)
As reported by a user:
Importing a photo with GPS data throws this exception:
Our code allows two format of GPS data, but is wrong.