News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

Google Photos finds GPS data but exiftool does not

Started by gaijin, November 30, 2022, 09:13:46 PM

Previous topic - Next topic

gaijin

I extracted GPS data of a photo using this command line:

% exiftool -filename -DateTimeOriginal -gpslatitude -gpslongitude -gpsaltitude IMG20221030174550.jpg
File Name                       : IMG20221030174550.jpg
Date/Time Original              : 2022:10:30 17:45:50

It outputs as if GPS data is not present. I opened the file using Preview app on Mac, no GPS data seems to be there. But when I uploaded to Google Photos, it recognizes the GPS data.

What happened? Did exiftool fail to get the GPS data?

The image file attached. It was taken with Oppo A9 2020 with GPS on.

StarGeek

When I upload that photo to Google Photos, it does not show a location.  Looking through the file with the -v3 (-verbose3) option shows no possible location for GPS data to be hiding in the file.

Try this command to see if there is any GPS data
exiftool -G1 -a -s -RequestAll 2 '-MDItemL*' IMG20221030174550.jpg

I have a suspicion that the GPS data might somehow have gotten into the MacOS file system tags.  These tags will usually be lost when uploading to a website, such as when you attached the file here, or when copied to another file system such as a Windows FS.  But it might be possible that Google photos is using some trickery to read the Mac MDItem tags during the upload.  I know that uploading from my Windows computer will read the FileModifyDate, a file system only tag, when there isn't an embedded time stamp.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

gaijin

Indeed when I downloaded the image I uploaded, it no longer has location data.
So let me try again with a different image, which is attached here. I made sure that using Preview app on the Mac and with exiftool, there was no location data. I uploaded to Google Photos, there was location (see attached screenshot). When I ran the command you gave, the result was as follows:

Error: File not found - 2
======== /Volumes/TOSHIBA 4TB/HDC2 1TB/Videos Audio and Photos/20221201 Oppo A9 2020/IMG20221116152546.jpg
    1 image files read
    1 files could not be read

wywh

It seems there is no location data in those sample images. Check your workflow and settings, maybe there are other images uploaded to Google Photos that carry or cache the location?

- Matti

gaijin

I don't know what workflow other than what I already mentioned, and what setting...
I don't think Google Photos caches location data, but even if it does, downloading the photo will bring back the original file to disk and there should be location data in it.

Quote from: wywh on December 01, 2022, 07:07:06 AMIt seems there is no location data in those sample images. Check your workflow and settings, maybe there are other images uploaded to Google Photos that carry or cache the location?

- Matti

gaijin

Sorry I have just resolved this issue. It turned out that Google Photos is estimating the location, I don't know exactly how. My smartphone turned out not getting GPS data somehow.

StarGeek

That PNG appears to show that you're uploading from your android device.  It might be that Google is taking the GPS data from the phone during the upload.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).