CSV geolocation import

Started by lumbendil, May 01, 2024, 04:59:27 PM

Previous topic - Next topic

lumbendil

Hi! I'm trying to use exiftool to add location metadata to a lot of pictures by using a CSV, and failing to do so. When I execute exiftool like `exiftool -geotag=data.csv images_folder`, if I inspect the files using Windows I see that it has set the longitude and the Altitude, but not the latitude. I've tried both with this format and with the latitude & longitude being a single decimal with the same result

Here you can see an excerpt of the CSV:

GPSAltitude,GPSDateTime,GPSLongitude,GPSLatitude
112,2024-03-21 00:14:30,"135 46 33.123000000014144","34 58 10.93403999999623"
112,2024-03-21 00:16:30,"135 46 33.083759999990434","34 58 10.906680000009032"
112,2024-03-21 00:17:41,"135 46 32.838959999994586","34 58 11.062559999988935"
112,2024-03-21 00:18:32,"135 46 33.12515999998823","34 58 10.94015999999101"
120,2024-03-21 00:20:33,"135 46 37.35299999997551","34 58 12.241200000000845"
120,2024-03-21 00:22:35,"135 46 34.96728000000303","34 58 11.542079999990733"
120,2024-03-21 00:24:35,"135 46 34.98456000000033","34 58 11.53991999999107"

StarGeek

Have you checked the file with exiftool?
exiftool -G1 -a -s -GPS* file.jpg

I copied your CSV file and ran it on an image and Windows picked up all three


Exiftool output
C:\>exiftool -G1 -a -s -gps* y:\!temp\Test4.jpg
[GPS]           GPSVersionID                    : 2.3.0.0
[GPS]           GPSLatitudeRef                  : North
[GPS]           GPSLatitude                     : 34 deg 58' 12.06"
[GPS]           GPSLongitudeRef                 : East
[GPS]           GPSLongitude                    : 135 deg 46' 36.75"
[GPS]           GPSAltitudeRef                  : Above Sea Level
[GPS]           GPSAltitude                     : 120 m
[GPS]           GPSTimeStamp                    : 00:21:04
[GPS]           GPSDateStamp                    : 2024:03:21
[Composite]     GPSAltitude                     : 120 m Above Sea Level
[Composite]     GPSDateTime                     : 2024:03:21 00:21:04Z
[Composite]     GPSLatitude                     : 34 deg 58' 12.06" N
[Composite]     GPSLongitude                    : 135 deg 46' 36.75" E
[Composite]     GPSPosition                     : 34 deg 58' 12.06" N, 135 deg 46' 36.75" E

While I don't think it should matter, what version of exiftool are you using?
exiftool -ver

What kind of file?

Windows is really bad with GPS coordinates, as it doesn't keep track of the reference direction. It will show the same number even when the reference direction is West or South (negative coordinates).
* 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).

lumbendil

Hi! Had not checked with exiftool. It is indeed there. Will have to check why it's not showing up in Windows & Lightroom then. Thanks for the help  ;D