• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.
  • Dark mode now has a single preference for the whole site! It's a simple toggle switch in the bottom right-hand corner of any page. As it uses a cookie to store your preference, you may need to dismiss the cookie banner before you can see it. Any problems, please let us know!

Geo-encode by time stamp

Status
Not open for further replies.

Mike Creighton

New Member
Premium Classic Member
Joined
May 30, 2018
Messages
15
Lightroom Experience
Advanced
Lightroom Version
Lightroom Version Number
LR Classic 7.1.3
Operating System
  1. macOS 10.13 High Sierra
I'm sure this must be straightforward, either in LR or Jeffrey Friedl's plugin, but I can't find it (too tired after a trip photographing owls in Finland - or that's my excuse) so I'm hoping someone can point me in the right direction.
I currently load images into LR from two cameras which I use on trips, one of which had GPS built in. I would like to copy the GPS coordinates from the images from the GPS enabled camera to the other images where they are within a certain timestamp criteria. For example, if an image from each camera were shot within, say, 2 minutes of each other the GPS from one would be copied to the other.
Obviously I am looking for a batch processing solution, to deal with several hundred images at a time.
Any pointers or suggestions gratefully received.
 
I'm sure this must be straightforward, either in LR or Jeffrey Friedl's plugin, but I can't find it (too tired after a trip photographing owls in Finland - or that's my excuse) so I'm hoping someone can point me in the right direction.
I currently load images into LR from two cameras which I use on trips, one of which had GPS built in. I would like to copy the GPS coordinates from the images from the GPS enabled camera to the other images where they are within a certain timestamp criteria. For example, if an image from each camera were shot within, say, 2 minutes of each other the GPS from one would be copied to the other.
Obviously I am looking for a batch processing solution, to deal with several hundred images at a time.
Any pointers or suggestions gratefully received.

Select all photos you want to apply identical coordinates to
Enter the coordinates in the GPS field.

Regards

Pål Engh
Fredrikstad, NORWAY
 
Select all photos you want to apply identical coordinates to
Enter the coordinates in the GPS field.

Regards

Pål Engh
Fredrikstad, NORWAY
Yes, thanks, I'm aware of that but that's not what I want to do. A little more detailed explanation....

If I was taking hundreds of images from a static location that would be fine, but my location changes several times an hour.

Say I have 500 images spread over 36 hours and many, many locations, all with GPS coordinates. I have another 300 images taken in the same general locations over the same 36 hours without GPS. I want to batch compare the 300 without GPS to those with GPS. If the timestamp meets the criteria I set then the GPS coordinates will be copied from one to the other. Otherwise, if i use the method helpfully suggested by Pål, I will have to to do them one at a time or groups of two or three - which is what I am trying to avoid.

Many thanks for the suggestion though.
 
Use the exiftool for that.

You can generate a GPS-Track out of existing photos like this:

exiftool -p d:\Photos\gpx.fmt -d %Y-%m-%dT%H:%M:%SZ d:\Photos_Orginal\Import\RAW\IMGL*.CR2 -if "$GPSPosition" > d:\Photos_Orginal\Import\GPX\track.gpx

File gpx.fmt should be included in exiftool download. Anyway, in case you miss it here is the content:

Code:
#[HEAD]<?xml version="1.0" encoding="utf-8"?>
#[HEAD]<gpx version="1.0"
#[HEAD] creator="ExifTool $ExifToolVersion"
#[HEAD] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
#[HEAD] xmlns="http://www.topografix.com/GPX/1/0"
#[HEAD] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
#[HEAD]<trk>
#[HEAD]<number>1</number>
#[HEAD]<trkseg>
#[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
#[BODY]  <ele>$gpsaltitude#</ele>
#[BODY]  <time>$gpsdatetime</time>
#[BODY]</trkpt>
#[TAIL]</trkseg>
#[TAIL]</trk>
#[TAIL]</gpx>

Afterwards use exported file "d:\Photos_Orginal\Import\GPX\track.gpx " like a usual GPS-Track, either make your geo referencing in LR or with exiftool.

Code:
exiftool -overwrite_original -preserve -api GeoMaxExtSecs=3600 -geotag d:\Photos_Orginal\Import\GPX\track.gpx "-Geotime<${DateTimeOriginal}+02:00" -if "not $GPSPosition" d:\Photos_Orginal\Import\JPG\IMG_*.JPG

Clause "-Geotime<${DateTimeOriginal}+02:00" is used to declare the offset between UTC time (used in GPS) and the local time set at your camera.
Clause "GeoMaxExtSecs=3600" defines the time margin. 3600 is one hour, 2 Minutes would be "GeoMaxExtSecs=120"
Due to clause '-if "not $GPSPosition"' you can run this command several times playing with time margins. GPS position is written only once to a photo.

Just a note, have a look at your camera. Perhaps it provides writing GPS-Tracks. Then it would be even easier.

Best Regards
Wernfried
 
Use the exiftool for that.

You can generate a GPS-Track out of existing photos like this:

exiftool -p d:\Photos\gpx.fmt -d %Y-%m-%dT%H:%M:%SZ d:\Photos_Orginal\Import\RAW\IMGL*.CR2 -if "$GPSPosition" > d:\Photos_Orginal\Import\GPX\track.gpx

File gpx.fmt should be included in exiftool download. Anyway, in case you miss it here is the content:

Code:
#[HEAD]<?xml version="1.0" encoding="utf-8"?>
#[HEAD]<gpx version="1.0"
#[HEAD] creator="ExifTool $ExifToolVersion"
#[HEAD] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
#[HEAD] xmlns="http://www.topografix.com/GPX/1/0"
#[HEAD] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
#[HEAD]<trk>
#[HEAD]<number>1</number>
#[HEAD]<trkseg>
#[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
#[BODY]  <ele>$gpsaltitude#</ele>
#[BODY]  <time>$gpsdatetime</time>
#[BODY]</trkpt>
#[TAIL]</trkseg>
#[TAIL]</trk>
#[TAIL]</gpx>

Afterwards use exported file "d:\Photos_Orginal\Import\GPX\track.gpx " like a usual GPS-Track, either make your geo referencing in LR or with exiftool.

Code:
exiftool -overwrite_original -preserve -api GeoMaxExtSecs=3600 -geotag d:\Photos_Orginal\Import\GPX\track.gpx "-Geotime<${DateTimeOriginal}+02:00" -if "not $GPSPosition" d:\Photos_Orginal\Import\JPG\IMG_*.JPG

Clause "-Geotime<${DateTimeOriginal}+02:00" is used to declare the offset between UTC time (used in GPS) and the local time set at your camera.
Clause "GeoMaxExtSecs=3600" defines the time margin. 3600 is one hour, 2 Minutes would be "GeoMaxExtSecs=120"
Due to clause '-if "not $GPSPosition"' you can run this command several times playing with time margins. GPS position is written only once to a photo.

Just a note, have a look at your camera. Perhaps it provides writing GPS-Tracks. Then it would be even easier.

Best Regards
Wernfried
Now that sounds like a plan. Many thnaks for the suggestion.
I can use the GPS tracks direct from the camera too, so this may be a good solution.
Best regards
Mike
 
Status
Not open for further replies.
Back
Top