Can ExifTool write compass data/bearing/orientation to JPG's EXIF?

Started by lsquare, January 07, 2014, 05:49:30 AM

Previous topic - Next topic

lsquare

Most geotagging solutions out there doesn't record the compass bearing information. A few hardware devices like the Canon GP-E2 will record such information with compatible Canon cameras. I recently became aware of ExifTool and it seems like this software support the tags like GPSDestBearing. Is it possible for me to manually input values for the GPSDestBearing tag and then get ExifTool to write it to the JPG's EXIF? If so, how?

Thanks!

Phil Harvey

To manually input a GPSDestBearing, you could use a command like this:

exiftool -gpsdestbearing=270 -gpsdestbearingref=true image.jpg

Note that the GPSDestBearingRef must also be written for the GPSDestBearing to be useable.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

If you're on Windows, you might take a look at Geosetter.  It will let you set the bearing and it uses ExifTool to do it.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

lsquare

Quote from: Phil Harvey on January 07, 2014, 07:27:37 AM
To manually input a GPSDestBearing, you could use a command like this:

exiftool -gpsdestbearing=270 -gpsdestbearingref=true image.jpg

Note that the GPSDestBearingRef must also be written for the GPSDestBearing to be useable.

- Phil

Thanks Phil!

I have to say that I'm not 100% clear with all of the tags that are related to the compass bearing. Are those two usually the ones that are used? I have an app for the iPhone that shows the bearings as well as a Garmin handheld GPS with a 3-axis compass. What values should I copy down and then input into ExifTool?

lsquare

Quote from: StarGeek on January 07, 2014, 06:19:57 PM
If you're on Windows, you might take a look at Geosetter.  It will let you set the bearing and it uses ExifTool to do it.

Hi StarGeek,

I have never used Geosetter before and I'm a newbie at this. Do you know where the fields are to enter the bearing information and what kind of values it'll accept and in what format?

Thank you.

Phil Harvey

Quote from: lsquare on January 07, 2014, 07:36:35 PM
I have to say that I'm not 100% clear with all of the tags that are related to the compass bearing.

The EXIF specification gives details about all of the possible GPS tags.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: lsquare on January 07, 2014, 07:37:21 PM
I have never used Geosetter before and I'm a newbie at this. Do you know where the fields are to enter the bearing information and what kind of values it'll accept and in what format?

This isn't a feature of GeoSetter that I've played with before, but a quick check shows me two ways to do it. 

First, you can click this button:


That will give you a graphic showing the direction of view.  Click and drag the circle to face the direction you want




The other, more precise way would be to click the Edit Location button above the images


Then you can exactly set the number in the direction box



Once you have all the data the way you want, just click the Save button (looks like a floppy disk) and Geosetter will save the info into the images using ExifTool. 
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

lsquare

Quote from: StarGeek on January 08, 2014, 05:15:54 PM
Quote from: lsquare on January 07, 2014, 07:37:21 PM
I have never used Geosetter before and I'm a newbie at this. Do you know where the fields are to enter the bearing information and what kind of values it'll accept and in what format?

This isn't a feature of GeoSetter that I've played with before, but a quick check shows me two ways to do it. 



Once you have all the data the way you want, just click the Save button (looks like a floppy disk) and Geosetter will save the info into the images using ExifTool.

StarGeek,

Thank you so much for taking the time to create that mini tutorial for me! I still have a few questions to ask, but your assistance have definitely helped enhance my understanding of this.

Looking at the last screenshot, what's the difference between the latitude and longitude fields and the dest. latitude and longitude fields? The dest. latitude and longitude fields are grayed out until I enter some values into the latitude and longitude fields.

For image direction, how come the drop box doesn't have other directions? I only see geographic north and magnetic north. What if I was facing east, west, or south?

Thank you!

Phil Harvey

The "Dest." boxes give the destination location (ie. where you are going).  These tags are rarely used.

The drop box is the reference direction for the degrees entered to its left.  Most of the time the reference will be true (geographic) north, but if you are using an uncorrected magnetic compass then the reference is magnetic north.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lsquare

Quote from: Phil Harvey on January 09, 2014, 07:17:51 AM
The "Dest." boxes give the destination location (ie. where you are going).  These tags are rarely used.

The drop box is the reference direction for the degrees entered to its left.  Most of the time the reference will be true (geographic) north, but if you are using an uncorrected magnetic compass then the reference is magnetic north.

- Phil

Thanks for the response Phil.

I've never heard of the destination fields before. In what situation would one be interested in filling it out? I always thought the whole point of geotagging photos was to make it easier to remember where the photos were taken. Why would I want to put in the destination (where I want to go) information?

If I were to take the compass bearing information from my phone through an app, wouldn't the reference be magnetic north since the phone wouldn't be smart enough to utilize the geographic north as its reference point?

Phil Harvey

Quote from: lsquare on January 10, 2014, 04:59:05 AM
Why would I want to put in the destination (where I want to go) information?

If you are travelling, this is useful information for some people.  It is one of the things that a GPS navigation system knows about, so the EXIF specification gives the ability to store this information.

QuoteIf I were to take the compass bearing information from my phone through an app, wouldn't the reference be magnetic north since the phone wouldn't be smart enough to utilize the geographic north as its reference point?

I have no idea.  Best consult the documentation for your phone.  It depends on whether or not the phone has magnetic declination tables.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lsquare

Quote from: Phil Harvey on January 10, 2014, 07:27:37 AM
Quote from: lsquare on January 10, 2014, 04:59:05 AM
Why would I want to put in the destination (where I want to go) information?

If you are travelling, this is useful information for some people.  It is one of the things that a GPS navigation system knows about, so the EXIF specification gives the ability to store this information.

QuoteIf I were to take the compass bearing information from my phone through an app, wouldn't the reference be magnetic north since the phone wouldn't be smart enough to utilize the geographic north as its reference point?

I have no idea.  Best consult the documentation for your phone.  It depends on whether or not the phone has magnetic declination tables.

- Phil

And how will apps like Lightroom or sites like Flickr show the Dest. GPS fields? If I already populate the location fields with the GPS coordinates, then Flickr will show where the picture was taken. I'm still somewhat confused about the use of the dest. location fields.

StarGeek

Quote from: lsquare on January 11, 2014, 03:29:42 AMAnd how will apps like Lightroom or sites like Flickr show the Dest. GPS fields? If I already populate the location fields with the GPS coordinates, then Flickr will show where the picture was taken. I'm still somewhat confused about the use of the dest. location fields.

I used a test photo, added a semi-random bearing using the graphical interface in Geosetter,  and uploaded it to Flickr.  Flicker recognized the geotag in the picture, but appeared to ignore the direction data.  There didn't appear to be any way to manually set a direction on Flickr.

I then loaded up the test photo into Lightroom 4.4 and checked it out.  Lightroom understood the location info and showed it to me on its map, but also seemed to ignore the direction.  As with Flickr, there didn't appear to be any way to manually set a direction.

For what it's worth, I wouldn't worry about it too much.  Just get the direction in there.   It's easy enough to remove the destination data if you're really worried about it.  This command will clear it out.
exiftool -GPSDestLatitudeRef= -GPSDestLatitude= -GPSDestLongitudeRef= -GPSDestLongitude= <file/dir>
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

lsquare

Quote from: StarGeek on January 11, 2014, 04:39:45 AM
Quote from: lsquare on January 11, 2014, 03:29:42 AMAnd how will apps like Lightroom or sites like Flickr show the Dest. GPS fields? If I already populate the location fields with the GPS coordinates, then Flickr will show where the picture was taken. I'm still somewhat confused about the use of the dest. location fields.

I used a test photo, added a semi-random bearing using the graphical interface in Geosetter,  and uploaded it to Flickr.  Flicker recognized the geotag in the picture, but appeared to ignore the direction data.  There didn't appear to be any way to manually set a direction on Flickr.

I then loaded up the test photo into Lightroom 4.4 and checked it out.  Lightroom understood the location info and showed it to me on its map, but also seemed to ignore the direction.  As with Flickr, there didn't appear to be any way to manually set a direction.

For what it's worth, I wouldn't worry about it too much.  Just get the direction in there.   It's easy enough to remove the destination data if you're really worried about it.  This command will clear it out.
exiftool -GPSDestLatitudeRef= -GPSDestLatitude= -GPSDestLongitudeRef= -GPSDestLongitude= <file/dir>

Thanks for the response.

I'm not worried about it. I just want to learn and understand. I wouldn't mind taking advantage of the destination GPS fields, but I still don't quite understand how to effectively utilize it. I don't even see such fields in Lightroom 5. Can you give me an example of how those fields are to be used?

Phil Harvey

I would be surprised if Lightroom or Flickr did anything with the GPSDest information.  There are many possible GPS tags, and they probably ignore most of them.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).