GPS formats

Started by DigPeter, December 21, 2015, 08:28:03 PM

Previous topic - Next topic

DigPeter

Can the format in which Latitude and longitude coords are displayed be altered?  The format I have is: nn deg nn' nn.nn" N/S or E/W, 1 deg 27' 52.29" W. I would like to be able to select other formats - for instance: +/- nn.nnnnnn or replace "deg" with superscript 'o', or decimal minutes (nn.nnn')

Mario

The formats are displayed as delivered by ExifTool. You can only choose between the formatted variant and the RAW variant (via the properties of the Metadata Panel). You cannot create custom formats for GPS coordinates.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter


Mario

If you display them via variables, you have additional options of course, e.g. text replacements. No maths or conversions, though.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Raw is OK for me.  But with raw displayed, the output from Export text with variables {File.MD.XMP::exif\GPSLatitude\GPSLatitude\0} ,; {File.MD.XMP::exif\GPSLongitude\GPSLongitude\0}   is in nn deg nn' nn.nn" format.  How can Export text outpt raw format?

Mario

Use the raw option with the format function. See help for details.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Quote from: DigPeter on December 21, 2015, 09:52:01 PM
Raw is OK for me.  But with raw displayed, the output from Export text with variables {File.MD.XMP::exif\GPSLatitude\GPSLatitude\0} ,; {File.MD.XMP::exif\GPSLongitude\GPSLongitude\0}   is in nn deg nn' nn.nn" format.  How can Export text outpt raw format?

Below is what I use to put the GPS in nn.nnnnn format.  The longitude is one character longer to allow for negative values.

{File.MD.XMP::exif\GPSLatitude\GPSLatitude\0|value:rawfrm; substr:0,8}
{File.MD.XMP::exif\GPSLongitude\GPSLongitude\0|value:rawfrm; substr:0,9}

DigPeter

Thank you, John.  I will try that.

DigPeter

Quote from: JohnZeman on December 21, 2015, 10:21:21 PM
Below is what I use to put the GPS in nn.nnnnn format.  The longitude is one character longer to allow for negative values.

{File.MD.XMP::exif\GPSLatitude\GPSLatitude\0|value:rawfrm; substr:0,8}
{File.MD.XMP::exif\GPSLongitude\GPSLongitude\0|value:rawfrm; substr:0,9}

@ John - It occurs to me that GPS coords from southern hemisphere would also need the extra character.  Perhaps you confine yourself to the North?

JohnZeman

Quote from: DigPeter on December 22, 2015, 12:49:36 PM
Quote from: JohnZeman on December 21, 2015, 10:21:21 PM
Below is what I use to put the GPS in nn.nnnnn format.  The longitude is one character longer to allow for negative values.

{File.MD.XMP::exif\GPSLatitude\GPSLatitude\0|value:rawfrm; substr:0,8}
{File.MD.XMP::exif\GPSLongitude\GPSLongitude\0|value:rawfrm; substr:0,9}

@ John - It occurs to me that GPS coords from southern hemisphere would also need the extra character.  Perhaps you confine yourself to the North?

Well Peter I don't know that confine would be the word I'd use since many years ago I was traveling the world over as a sailor, but essentially yes.  These days I pretty much limit...err confine my travels to the USA and Canada.  ;)

The reason I limit the latitude raw output to 8 characters and the longitude to 9, is because now days when I travel the latitude is positive while the longitude is always negative (e.g. Latitude: 25.12521 Longitude: -80.40623).

If you want more (or less) characters displayed in either simply change the 8 (and/or 9) in the above to different numbers as those control the number of characters in the output of the raw format.

DigPeter

 :)
I understand.  Living in UK and with advancing years, I "confine" myself mainly to Europe, but this requires positive & negative longitude.  As I have images from all 4 quadrants, I have extended latitude to 9 characters.
Thanks for your help.