I have taken over 500 photos on my recent journey and I'd love to code a program that allows me to access the GPS location of every photo and, through GMaps API, show me where the photo was taken.
Problem is that after copying all the photos on my Windows 10 desktop, not all the photos have preserved all the EXIF data. Some have both longitude and latitude, some one of the two, some neither.

How can I have a copy of all the images on my computer that have correct EXIF data?

Notice that if I go under "Details" of each and every photo on my Android device, the GPS location is perfectly correct.


As requested, I have grouped a sample of three different pictures that have missing GPS location here at this link.
I also noticed that every photo that does not have missing GPS location still has it wrong: they all should have negative longitude, while all have it positive.


I'll post some "okay photos" here, meaning that they have both latitude and longitude but, as stated above:

they all should have negative longitude, while all have it positive.

  • 1
    Precisely how did you transfer the images from your phone to your Windows PC?
    – Philip Kendall
    Aug 25 '20 at 12:52
  • Philip Kendall I copy-pasted the entire folder. My Android device doesn't have a software that would otherwise allow me to do the same thing.
    – davide m.
    Aug 25 '20 at 14:38
  • 1
    I don't see any reason why some of the GPS data would be removed by the file copying. One possible explanation is that some data is borderline and not readable by the application you use. Dod you check with several applications (and which)? Can you post one of the original files problem files somewhere?
    – xenoid
    Aug 25 '20 at 15:35
  • I know I'm being ultra-pedantic here, but it can matter: copy-paste while your Android device was plugged in with a USB cable directly between the PC and the device, or some other way?
    – Philip Kendall
    Aug 25 '20 at 15:36
  • Philipp Kendall yes, the phone was connected via USB directely to my desktop. I then browsed the phone's folder using Windows' file explored, then copy-pasted the entire folder.
    – davide m.
    Aug 25 '20 at 15:42

I'm seeing this for IMG_20200815_111436.jpg. Longitude looks OK.

[EXIF]          GPS Latitude Ref                : N
[EXIF]          GPS Latitude                    : 64.2597599722222
[EXIF]          GPS Longitude Ref               : W
[EXIF]          GPS Longitude                   : 21.122264
[EXIF]          GPS Altitude Ref                : 0
[EXIF]          GPS Altitude                    : 195.563
[EXIF]          GPS Time Stamp                  : 11:14:36
[EXIF]          GPS Processing Method           : GPS
[EXIF]          GPS Date Stamp                  : 2020:08:15

As numbers,

[Composite]     GPS Position                    : 64.2597599722222 -21.122264

Which puts it in Iceland.

Further investigation - I'd say the panorama mode is the problem

======== IMG_20200815_111436.jpg
[XMP]           Capture Mode                    : Photo
[EXIF]          GPS Longitude                   : 21 deg 7' 20.15"
[Composite]     GPS Longitude                   : 21 deg 7' 20.15" W
[EXIF]          GPS Longitude Ref               : West
======== IMG_20200816_120316.jpg
[XMP]           Capture Mode                    : Panorama
[XMP]           Capture Mode                    : Panorama
======== IMG_20200817_105157.jpg
[XMP]           Capture Mode                    : Panorama
[XMP]           Capture Mode                    : Panorama
======== IMG_20200817_120445.jpg
[XMP]           Capture Mode                    : Photo
[EXIF]          GPS Longitude                   : 18 deg 10' 36.30"
[Composite]     GPS Longitude                   : 18 deg 10' 36.30" W
[EXIF]          GPS Longitude Ref               : West
======== IMG_20200817_163523.jpg
[XMP]           Capture Mode                    : Panorama
[XMP]           Capture Mode                    : Panorama
======== IMG_20200820_162847.jpg
[XMP]           Capture Mode                    : Manual
[EXIF]          GPS Longitude                   : 20 deg 38' 14.52"
[Composite]     GPS Longitude                   : 20 deg 38' 14.52" W
[EXIF]          GPS Longitude Ref               : West
  • This looks more and more confusing, because I have some panorama pictures that do not have this issue, meaning they do have both longitude and latitude.
    – davide m.
    Aug 25 '20 at 21:46
  • @davide m - I'm seeing the same thing that Alan Clifford stated. All three Okay Photos show correct lat/long. All three missing GPS photos show Panorama with non-standard image sizes. I'm guessing your OnePlus phone provides in-camera editing. This begs the question as to what files are being looked at for the on camera Panorama pictures by GMaps API. Perhaps it's looking at one of the original pictures that are used to create the Panorama. In any case, it looks like it's the Panoramas and has nothing to do with the file copy. Aug 26 '20 at 0:48

I can only suggest a couple of other things.

Download the photos using a different method. I use an app called "primitive ftp" on my android phone. I use "filezilla" on my mac but it is available for windows. Use ftp to transfer the files.

Install exiftool from https://exiftool.org/ This is a command line program that will allow you to look at all the metadata in the files to see if you can determine if there is something in common with the faulty files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.