Using GPS Position

Started by cytochrome, August 20, 2013, 05:31:52 PM

Previous topic - Next topic

cytochrome

I tried to copy the GPS Position from one image with GPS coordinates to others I wanted to tag. Since the string is taken from the IM metadata panel I suppose it is in the right format, like 43 deg 14' 10.35" N, 5 deg 28' 3.65" E

It does not work, after a minute backstage activity nothing happens. I tried several times. In the ExifTool doc I read "Any string containing between 1 and 3 floating point numbers is valid"

Is the GPS position  tag not an "entry" tag but a result computed by exiftool only if I enter Latitude 43 deg 14' 10.35" N and Longitude 5 deg 28' 3.65" E ?

It is of course faster to copy one string than two...

Francis

JohnZeman

Which GPS tags did you use?  whenever I need to copy GPS from one image to another I copy it from and to the following tags and that works as expected.

{File.MD.Composite\GPSLatitude\GPSLatitude\0}
{File.MD.Composite\GPSLongitude\GPSLongitude\0}
{File.MD.XMP::exif\GPSLongitude\GPSLongitude\0}
{File.MD.XMP::exif\GPSLatitude\GPSLatitude\0}


Most likely it wouldn't be necessary to copy it to both the xmp and composite tags, I just do so because I know then the GPS metadata will be copied elsewhere as ExifTool needs it.

Mario

Quote from: cytochrome on August 20, 2013, 05:31:52 PM
I tried to copy the GPS Position from one image with GPS coordinates to others I wanted to tag. Since the string is taken from the IM metadata panel I suppose it is in the right format, like 43 deg 14' 10.35" N, 5 deg 28' 3.65" E

How did you "Copy" ?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

cytochrome

I copied the GPS Position tag (because it contains latitude and longitude in one single string) using CTRL C and pasted with CTRL V.

I copied directly from metadata panel to metadata panel of next image. Is this silly?

Francis

[attachment deleted by admin]

Mario

When I do that, I see in the ExifTool Output Panel the following message:

Warning: Sorry, Composite:GPSPosition doesn't exist or isn't writable.

(Always a good idea to check the ExifTool output panel in such cases. And to enable the verbose output option under Edit > Preferences > Application).

so this tag cannot be used to update the GPS data in the file. I assume you use the sample Default Metadata Panel layout I ship with IMatch?
I think if you want to update GPS data by copy Paste you need to change this layout to use the original EXIF or XMP GPS tags. We may need to change the sample layout for this purpose. Please add a feature request so I won't forget this. I'm totally busy with other things right now.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I made some extra checks. The GPSCoordinate tag is indeed flagged as "non-writable" and IMatch should show it with a lock icon in the Metadata Panel. I have corrected this problem now.

The individual Composite coordinates (lat/long) are writable, only the convenient combined GPSCoordinate tag is not.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

cytochrome

Thank you Mario, I had not checked the Exiftool panel output :-[  since I got no warning, simply there was no copy. I understand why now.
I use a personal metadata panel but I had copied the GPS Position tag to it: seemed very convenient!!

I am changing all this so the copy will work.

Francis

Mario

Actually, at least with the latest 9.35 version of ExifTool, all Composite GPS tags are marked as read-only. Some work when used as the target of a write, but since they are marked as read-only, we better not rely on this.

I can swap the Default sample Metadata Panel layout to use the XMP GPS tags instead. Of the EXIF GPS tags. I'm not sure which ones to choose.

If I use the XMP GPS tags, they will update XMP and EXIF on write-back - assuming that the user uses the standard Metadata 2 settings.
If I use the EXIF GPS tags instead, the XMP tags will be updated on import during write-back, assuming that the user uses the default Metadata 2 settings.
Either way, either the EXIF or the XMP GPS tags will be auto of synch once the user has updated GPS data until the next write-back.

I think I will include the XMP GPS tags in the default layout, and make the EXIF GPS tags read-only (similar to the IPTC tags which are updated from XMP automatically).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

cytochrome

The xmp gps tag is the safe way to go I think, if it is tranported to Exif from within IMatch, so all types of file will inherit these values if set manually in Imatch (and depending on the relation rules that one defines).

The important facts for me are:

- the GPS information is visible in the standard Metadata panel
- it will be written to raw or xmp sidecar depending on one's settings in metadata2

Francis

Mario

Now that I have the read-only tag detection working again, the EXIF GPS tags are automatically marked as read-only (with the hint "This tag is mapped") in the UI).  The XMP tag is the one to use in the metadata panel and I have already switched the "Default" tags in the Tag Selector dialog to use the XMP tags.

Of course a user is free to choose which tags to display in custom metadata panel layouts.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

cytochrome

#10
Ok, this is fine for me. I suppose it (the read only hint) will be effective in v108...

Francis

PS I have now setup my metadata panel with:
{File.MD.XMP::exif\GPSAltitude\GPSAltitude\0}
{File.MD.XMP::exif\GPSLatitude\GPSLatitude\0}
{File.MD.XMP::exif\GPSLongitude\GPSLongitude\0}

The copy works well, but since it is a pain to copy field after field (I have not discovered how to copy 2-3 fields) I setup some metadata panels following the example given by John Zeman here: https://www.photools.com/community/index.php?topic=644.0 a very good explanation, could go into an addendum to the help

Mario

Quote from: cytochrome on August 21, 2013, 03:27:48 PM
Ok, this is fine for me. I suppose it (the read only hint) will be effective in v108...

The EXIF GPS read-only hint should work in the 106 too. It's only enabled if XMP->EXIF propagation is enabled under Edit > Preferenced > Metadata 2, or MWG compliance is On.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Rene Toepfer

I have created a Metadata template using
{File.MD.XMP::exif\GPSLatitude\GPSLatitude\0}
{File.MD.XMP::exif\GPSLongitude\GPSLongitude\0}
{File.MD.XMP::exif\GPSAltitude\GPSAltitude\0}
with decimals, e.g. 51.049477. My intention is the same than the thread starter had.

I've read Mario's explanation below and this works fine while write-back:
Quote from: Mario on August 21, 2013, 01:08:39 PM
If I use the XMP GPS tags, they will update XMP and EXIF on write-back - assuming that the user uses the standard Metadata 2 settings.

What I do not understand is that these values will not be filled-in in fields marked at attached screen grab by selecting the template but can be entered manually. In related "5 GPS Details" it will be filled-in by the template and propagated while write-back.

Then I've figured some format issue out. At {File.MD.XMP::exif\GPSAltitude\GPSAltitude\0} the decimal separator is a comma while for the both remaing it is a point.

Mario

I don't recommend or support fiddling with GPS coordinates manually. Because not only the GPS coordinates must be set, but maybe other depending tags must be updated too.
IMatch offers so many ways to view, set and modify GPS coordinates, trying to do it manually via a Metadata Template is not a good idea.

Make sure you understand the difference between formatted and raw metadata values.
ExifTool manages two values for most tags. A raw value (the GPS coordinate as a rational number) and as a formatted value.
When modifying GPS data (Map Panel, Metadata Panel, ...), IMatch updates the raw value (the number) and the formatted value internally in the database.

You cannot update raw metadata via a Metadata Template. This is not an option metadata templates offer for obvious reasons (the format varies per tag and must be formatted correctly and users would do it wrong, breaking who knows what).

Please use one of the many features in IMatch to work with GPS coordinates and related metadata. They ensure that things are properly formatted, depending tag and values are updated as needed etc.
Consider using Locations instead of Metadata Templates for this purpose. Or set the GPS coordinates in the Map Panel. Or set the GPS coordinates in the Metadata Panel, if you really must do it manually.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook