Forum

Author Topic: Cameras Exif/GPSLongitude information reading is wrong  (Read 1804 times)

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Cameras Exif/GPSLongitude information reading is wrong
« on: July 13, 2022, 06:19:04 PM »
Hi,
I am doing some test. I add the geotag info in an image using exiftool. But when I load those image in the metashape and check exif 
Code: [Select]
[code]chunk.cameras[0].photo.meta['Exif/GPSLongitude'][/code] I am getting string return like ''81,0.10788288W' this. But with I tried some other image I am getting  return link ''-80.9804473374' . Not sure was it trigger by exif update I did. But When I load the same exif update image in gui. and look at the reference  the tag is readie[/font][/size]d like ''-80.9804473374' . Not sure where is the source of error or further forming in need. [/font][/size]

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14843
    • View Profile
Re: Cameras Exif/GPSLongitude information reading is wrong
« Reply #1 on: July 14, 2022, 06:18:50 PM »
Hello ppant,

can you provide the complete output of chunk.cameras[0].photo.imageMeta() command?

And what is the actual value that you expect to be used as Longitude value?
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Cameras Exif/GPSLongitude information reading is wrong
« Reply #2 on: August 03, 2022, 12:15:30 AM »

Hi Alexy sorry for late response, this is what I get Running chunk.cameras[0].photo.imageMeta() I got as below . When i load the image via gui I get the correct Lat Long value (42.357163, -86.144123)
Code: [Select]
{'Exif/DateTimeOriginal': '2022-07-31T10:36:50', 'Exif/FocalLength': '3.8', 'Exif/FocalPlaneXResolution': '384.6153919969293', 'Exif/FocalPlaneYResolution': '384.6153919969293', 'Exif/GPSAltitude': '75080/367', 'Exif/GPSAltitudeRef': '0', 'Exif/GPSLatitude': '42,21.42979401N', 'Exif/GPSLongitude': '86,8.64738735W', 'Exif/ImageDescription': '{"shape": [1440, 1920, 4]}', 'Exif/LensModel': 'iOS', 'Exif/Make': 'Apple', 'Exif/Model': 'AgerPoint.iPhone14.2', 'Exif/Orientation': '1', 'Exif/Software': 'tifffile.py', 'Exif/XMLPacket': '<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
2022-08-02 13:59:21 <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP Core 6.0.0'>
...........

<?xpacket end='w'?>', 'File/ImageHeight': '1440', 'File/ImageWidth': '1920', 'Pix4D/GPSXYAccuracy': '0.1', 'Pix4D/HorizCS': 'EPSG:4326', 'Pix4D/LensModel': 'iOS', 'Pix4D/ModelType': 'perspective', 'Pix4D/PerspectiveDistortion': '0.000001,0.0,0.0,0.0,0.0', 'Pix4D/PerspectiveFocalLength': '3.7124205', 'Pix4D/Pitch': '72.03990173339844', 'Pix4D/PrincipalPoint': '2.4960017,1.8719994', 'Pix4D/Roll': '3.311664342880249', 'Pix4D/SubsecTimeOriginal': '999114', 'Pix4D/VertCS': 'EPSG:5773', 'Pix4D/Yaw': '176.25314331054688', 'Tiff/BitsPerSample': '8', 'Tiff/ImageLength': '1440', 'Tiff/ImageWidth': '1920', 'Tiff/YCbCrSubS


Paulo

  • Hero Member
  • *****
  • Posts: 1320
    • View Profile
Re: Cameras Exif/GPSLongitude information reading is wrong
« Reply #3 on: August 03, 2022, 01:24:17 PM »
Hello ppant,

I think your Exif GPSLatitude and GPSLongitude are stored in following format:
DD, mm.mmmmmmmmH whre D are degrees, m minutes and H hemisphere (N/S for Lat and E/W for long)

so for 'Exif/GPSLatitude': '42,21.42979401N', the latitude value in decimal degrees would be:

Lat = 42 + 21.42979401 / 60 = 42.3571632335 deg
Best Regards,
Paul Pelletier,
Surveyor