Skip to content

Instantly share code, notes, and snippets.

@yoonbae81
Created May 16, 2022 10:18
Show Gist options
  • Save yoonbae81/f8a01cc17312588b567e5dc4a1581dbc to your computer and use it in GitHub Desktop.
Save yoonbae81/f8a01cc17312588b567e5dc4a1581dbc to your computer and use it in GitHub Desktop.
Inverse Geotagging

Inverse Geotagging

Generate GPX tracking file

Make

exiftool -DateTimeOriginal-=4 -overwrite_original *.jpg

Adjust local time when fogot timezone setting

exiftool "-GPSTimeStamp<DateTimeOriginal" "-GPSDateStamp<DateTimeOriginal" *.jpg

Inverse geotagging

exiftool -r -if "$gpsdatetime" -fileOrder gpsdatetime -p gpx.fmt *.jpg > log.gpx

Geotag

delete previous tags

exiftool -geotag= -overwrite_original *.jpg

Adjust local time to avoid

exiftool -DateTimeOriginal+=3 -overwrite_original *.jpg
exiftool -geotag=log.gpx -api GeoMaxIntSecs=86400 -api GeoMaxExtSecs=86400 -overwrite_original *.jpg
exiftool -DateTimeOriginal-=3 -overwrite_original *.jpg

Check

exiftool -filename -gpslatitude -gpslongitude -n *.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment