Author Topic: Reverse Geocoding destroys GPS "created" Altitudes  (Read 143 times)

lbo

  • Sr. Member
  • **
  • Posts: 260
Reverse Geocoding destroys GPS "created" Altitudes
« on: August 16, 2019, 12:18:23 PM »
Steps to reproduce:

  • Add a "direction marker" to several files containing GPS coordinates with altitudes
  • Select these images
  • Ctrl-M,G to invoke Reverse Geocoding dialog
  • Check "Apply changes ... radius" and set a radius large enough to catch all images
  • Click "'Shown Coordinate' button
  • Hold "Alt" to get "Lookup 'Shown'" button instead of "Lookup"
  • Click "Lookup 'Shown'" button
  • Select an entry from the list retrieved from the location provider
  • Click "OK"
  • Write back

Result:

  • After switching the dialog to 'Shown Coordinate', it still displays the "created" altitude even if the images have no "shown" altitude. Long/Lat switch correctly.
  • All images get the retrieved Country/State/City as expected
  • The first image gets "shown altitude" set to the queried elevation as expected.
  • Images 2..n get the old "created" altitude of the first image in "created" and "shown" fields

This means, the "created" GPS altitude of images 2..n is now lost!

This happens even if "Fill only empty fields" is checked.

Find demo images attached. Their altitude values are 1244m, 1245m, 1246m. After the procedure described above, they are set to 1244m.

Oliver

P.S.:
this could be related to https://www.photools.com/community/index.php?topic=8430.0 but details differ.
It relates somewhat to https://www.photools.com/community/index.php?topic=8921.0 (Feature request)

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 22591
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #1 on: August 16, 2019, 01:57:43 PM »
I will look into this as soon as I have time. Currently I'm at 120% with urgent changes to make IMatch again compatible with ExifTool.
You may want to use the free GeoSetter application until then.

Remember that GPS Metadata (the native GPS data, not XMP IPTCExt) has only one Altitude value. It has Dest/Created coordinate pairs, but can only store on Altitude.
It depends on ExifTool which of the XMP GPS altitude values will be mapped to native GPS data in your file.

lbo

  • Sr. Member
  • **
  • Posts: 260
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #2 on: August 16, 2019, 05:42:36 PM »
You may want to use the free GeoSetter application until then.

I'm your customer because I can't use Geosetter.

Besides, Geosetter will not repair my corrupted files.

Remember that GPS Metadata (the native GPS data, not XMP IPTCExt) has only one Altitude value. It has Dest/Created coordinate pairs, but can only store on Altitude.

I'm aware of this, but...

It depends on ExifTool which of the XMP GPS altitude values will be mapped to native GPS data in your file.

...I think it's "very unlikely" that the bug is caused by ExifTool.

Please let me know if I was not detailed enough, and I will provide more information.

Just to avoid misunderstandings: This seems to be an error of the category "data corruption", not a minor annoyance easily to be worked around.

I'm still worried and looking for ways to identify the damaged files and reconstruct the correct altitude data.

Oliver

P.S.: If you navigate to a picture other than the first one before clicking "Lookup 'Shown'", you get different results including "zero" shown altitude.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 22591
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #3 on: August 16, 2019, 06:23:05 PM »
This is the first related report as far as I can tell.

As I said, I will look into this as soon as I have time. Looks not like data corruption, more like a problem with reverse geo-coding and how it applies the Altitude value returned by the service.
Please provide a sample file so I can see what data was in the file before you started reverse geo-coding. Also let me know which service you use, the IMatch version you are using etc.

lbo

  • Sr. Member
  • **
  • Posts: 260
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #4 on: August 16, 2019, 08:54:33 PM »
This is the first related report as far as I can tell.

There have been issues in the past regarding "first file different in reverse geocoding" but this one seems to be even worse.

Looks not like data corruption, more like a problem with reverse geo-coding and how it applies the Altitude value returned by the service.

If IMatch overwrites existing "location created" altitude if I do a "location shown" query, it corrupts my valuable data.

Please provide a sample file so I can see what data was in the file before you started reverse geo-coding. Also let me know which service you use, the IMatch version you are using etc.

Aren't the three images sufficient I already provided in the original posting?

The service was Google, IMatch is "current" (2019.6.2).

The ExifTool log window had these lines for Peissenberg_00106.jpg and Peissenberg_00107.jpg
-XMP-exif:GPSAltitude#=1244.00
-XMP-iptcExt:LocationCreatedGPSAltitude#=1244.00
-XMP-iptcExt:LocationShownGPSAltitude#=1244.00


the wrong altitudes were explicitly set by IMatch, no ExifTool problem.

This was sent for Peissenberg_00104.jpg (the first image):
-XMP-iptcExt:LocationCreatedGPSAltitude#=1244.00
-XMP-iptcExt:LocationShownGPSAltitude#=597.07
-XMP-exif:GPSAltitude#=1244.00


Oliver

P.S.: Please consider again my feature request to make retrieval of elevation optional: https://www.photools.com/community/index.php?topic=8921.0

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 22591
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #5 on: August 18, 2019, 06:59:38 PM »
I have tried to reproduce this.

I fabricated files with different lat/lon shown lat/lon, within a radius of on Kilometer.
For "created" I used altitudes starting at 30m, for the IPTC Ext location shown I set altitudes starting at 100m.
This makes it easy to detect changes.

I select these files and perform the operations you describe in your post.

The first difference I see to your description is after I change the dialog to the "Shown" coordinate.
You write:

Quote
After switching the dialog to 'Shown Coordinate', it still displays the "created" altitude even if the images have no "shown" altitude. Long/Lat switch correctly.

I could not see the effect you describe. Mhm.
I select by 5 sample files with 40,50 (created),... and 100,120,,, (shown Altitude).

I switch to "Shown Coordinates" and then press Alt to lookup the shown coordinate for the selected file.
This changes the 'shown' altitude from 100 to 35. Correct. It also updates empty fields in the address. Correct.

I navigate the other selected files using the cursor keys in the dialog and they still have their original created/shown altitude. Correct.

I disable "Apply to All within Radius" to avoid overwriting all files nearby with the coordinates of the selected file (!).
I click OK to save my changes.

The result is as expected. The file modified by me in the dialog has the new shown altitude (and the old created altitude). All other files are unaffected.

Why do you combine the "Apply all" feature with a multi-file selection. I'm quite sure this does not what you want.

Did you mix files with and without shown coordinates in your test, perhaps?
I tried that both with sets of files having known Altitudes in created/dest and with mixed files (only created coordinates, only shown coordinates).
« Last Edit: August 18, 2019, 07:16:43 PM by Mario »

lbo

  • Sr. Member
  • **
  • Posts: 260
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #6 on: August 18, 2019, 09:33:27 PM »
I have tried to reproduce this.

I fabricated files with different lat/lon shown lat/lon, within a radius of on Kilometer.
at both with sets of files having known Altitudes in created/dest and with mixed files (only created coordinates, only shown coordinates).

why didn't you use the files I provided in the original posting?

For "created" I used altitudes starting at 30m, for the IPTC Ext location shown I set altitudes starting at 100m.

As I wrote in the OP (and as you can see in the demo files provided), my files have no "shown altitude". Just lat/lon coordinates set interactively in the map panel.

Why do you combine the "Apply all" feature with a multi-file selection. I'm quite sure this does not what you want.

I do one lookup instead of "Lookup all" because:
  • I first want to see the query result list and decide which is the right one
  • All target positions are close together so they are in the same district ((sub)location). One query is enough.

Did you mix files with and without shown coordinates in your test, perhaps?

No, all three images provided in my original posting have camera and "shown" coordinates. Have a look for yourself.

Oliver

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 22591
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #7 on: August 19, 2019, 02:20:59 PM »
I think I now understand what ou describe.

Under some conditions, when the "Apply nearby" option was used, the Altitude of the destination files was replaced, even if the "only empty" option was enabled.
The "only empty" was only considered for the location data, not for Altitude data.
I have fixed that for the next release.

The dialog now correctly displays 0 for altitude if the IPTCExt::destLocation altitude value is empty or invalid.

lbo

  • Sr. Member
  • **
  • Posts: 260
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #8 on: August 19, 2019, 02:55:17 PM »
Under some conditions, when the "Apply nearby" option was used, the Altitude of the destination files was replaced, even if the "only empty" option was enabled.
The "only empty" was only considered for the location data, not for Altitude data.

Thanks for fixing the "non empty" error, but that's not the main issue I reported since my files had empty "shown" altitude.

The main problem is that the "created" GPS altitude of images 2..n is overwritten (and "shown" altitude are set to wrong values):

Images 2..n get the old "created" altitude of the first image in "created" and "shown" fields
Oliver

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 22591
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #9 on: August 19, 2019, 03:18:19 PM »
Same reason as above.
I guess I have all fixed. if not, re-open this bug report when the next release is out.

lbo

  • Sr. Member
  • **
  • Posts: 260
Re: Reverse Geocoding destroys GPS "created" Altitudes
« Reply #10 on: August 19, 2019, 03:21:58 PM »
great, thanks!