Direction in words, eg as composite value

Started by linuxuser, March 30, 2018, 10:27:17 PM

Previous topic - Next topic

linuxuser

My Pentax K-1 shows "0x0011 GPS Img Direction", eg 331.25. For analyzing a photo a name instead of 331.25 would be a lot better. So I suggest to convert and round the value to _8_ intercardinal directions, maybe as an option with 4, 16 and 32 positions. For my imagination it doesn't make sense to use more than 8 positions. Maybe 4 positions are enough for me. Mainly I want to understand where the sun was compared to the time, when I took the photo. If there is no field which fits for this value, I suggest to use composite.

If it is not clear what I mean, please look at https://en.wikipedia.org/wiki/Points_of_the_compass

Thanks for thinking about this request.


Phil Harvey

This may be done with a user-defined Composite tag.  I don't have time right now to show you how to do this, but if you want I can do this in a couple of days.

- 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 ($).

linuxuser

Thanks Phil, no need to hurry. I am waiting for your reply when you have time.

StarGeek

Unfortunately I don't have access to a real computer at the moment and entering code on a mobile is annoying to say the least. So here's the next best thing I could do. 

I wrote out a user-defined tag which I think will work, and took a picture of it.  Obviously I haven't tested it. If you feel like typing it in give it a try.

http://i.imgur.com/jLrqkQW.jpg
"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

linuxuser

Thanks, but I fear, I don't know how to du use it. I am using a linux box with a bash-terminal or a bash-script with exiftool commands.

At the end I need a field (probably xmp) in the photo which can be read by the Android app F-stop.

(No need to hurry with a reply)

Phil Harvey

The definition that StarGeek gave should be placed in the Composite tags section of a config file.  See the sample config file for details.

- 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 ($).

Phil Harvey

I just created a config file using StarGeek's suggestion.  Works great.  Attached is the config file you can use with this command to see the cardinal direction:

exiftool -config CardDirec.config -carddirec FILE

To write this to an XMP tag (eg. Description) that is readable by other apps, you would do something like this:

exiftool -config CardDirec.config "-xmp:description<carddirec" FILE

- 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

"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