Locations - Snap image coordinates to location coordinates

Started by erichaas, August 26, 2019, 06:03:12 AM

Previous topic - Next topic

erichaas

I have a location with the "Snap image coordinates to location coordinates" check box unchecked. However, when I apply this location to images, it overwrites the GPS coordinates of the image with the GPS coordinates of the location. I thought that was only supposed to happen if the box was checked. Am I misunderstanding what this check box is supposed to do?

Mario

Did your file have GPS created or shown or created and shown before?
Where did you apply the location? Map panel? Metadata Panel?
...

If you used the "Assign Location to all selected files" in the Map Panel, this behavior is normal.
The Map panel assumes that you want to assign the location (including coordinates) to all selected files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Quote from: Mario on August 26, 2019, 09:07:44 AM
If you used the "Assign Location to all selected files" in the Map Panel, this behavior is normal.
The Map panel assumes that you want to assign the location (including coordinates) to all selected files.

This makes sense that if the user has selected to assign a given IMatch Location to one or more images, that the entirety of the Location should be assigned.  But if that same location gets assigned via a Metadata Template (that has its Assign GPS coordinates of location option unchecked), then the GPS coordinates are retained.

The two operations are slightly different...when the user explicitly assigns a Location to an image in the Map Panel, the location has already been chosen, and it's being explicitly assigned to one or more images...whereas, when a Metadata Template is applied, IMatch has an image, for which a Location must be resolved to, before it can be assigned (and in that instance the existing coordinates can be made to be retained). 

I imagine that this slight difference, might actually represent a very significant difference in terms of the work that IMatch must do in order to have both operations behave the same way.  But I can see this as something that many users would prefer (that when explicitly assigning a Location to an image whose existing GPS Coordinates already fall within the given Location, and that Location has been configured to not "Snap image coordinates...", the Location Data should be applied without altering the existing Coordinates in the image.

But I can also see that this might need to be a feature request, since perhaps the Map Panel might not have the benefit of knowing that the Location and the image already coincide (as "base IMatch" obviously knows when it has resolved an image to a Location via a Metadata Template)...
--Tony

Mario

When you set  coordinates from a MD template via the Location option and one of your locations, you have an option to keep the coordinates of the image or to snap it to the locations of the found location. Does this no longer work? I haven't tested this since the last change, and at that time it worked.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Mario:

Yes, that still works.

I tried applying a location via a MD Template (at ingest) both when the location had its "Snap image coordinates..." option checked and unchecked.  With that option checked, the coordinates in the image are changed to be those from the Location's Center Point.  And with that option unchecked, the coordinates in the image remain unchanged.  So this functions as expected in both cases (except for the Shown coordinates, which is discussed in another topic).

But as the OP noted, when that location is applied "manually", via the Map Panel, the coordinates are changed to the Location's Center Point, regardless of the "Snap image coordinates..." setting.  I suspect that when a location is applied via the Map Panel, the work that determines whether the existing coordinates fall within the location has not been done, so the Location's Center Point is applied unconditionally there.  But I can see wanting this to behave the same way as it does when the location is applied via a MD Template.
--Tony

Mario

When you apply a location in the map panel, all images receive that location (center point).
There is no option to "keep" the image coordinates. This would be useless. The idea to apply a location to files is to set all files to the coordinates and data of that location.

The option in the MD panel works differently.
Here you can tell IMatch to search all existing locations based on the coordinates in the image. If a location is found, the data of that location is copied. And optionally you can change the image coordinates to the coordinates of the best matching location. If you instead configure a fixed location in your MD template, the coordinates and data of that location are applied to all images.

If and which coordinate pair is modified depends on the existing coordinates and data in your files (wether it has created, shown, only shown, only created, or both).

It would be helpful to see the MD template used, the location data found and the metadata of the image used for this test (ExifTool Command Processor output, for example. Using the "List Metadata" template). This would allow me to setup the same situation here to analyze what's happening and if the result is correct.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Quote from: Mario on November 23, 2019, 01:56:33 PM
When you apply a location in the map panel, all images receive that location (center point).
There is no option to "keep" the image coordinates. This would be useless. The idea to apply a location to files is to set all files to the coordinates and data of that location.

Yes, it makes sense that the design of this feature is to apply all aspects of the location to the selected files.

But given these three cases when applying a location that way:

1.) The image has no GPS coordinates
2.) The image has GPS coordinates that fall outside of the location circle
3.) The image has GPS coordinates that are inside the location circle

...I can see where the user might expect the coordinates to remain unchanged for case number 3, when the location has its "Snap image coordinates..." setting unchecked.

But having a Metadata Template apply the location, is really "the proper way" to achieve that.  And for images that were indexed before IMatch was configured with that MD Template (I have quite a few in my databases), there are other options for applying the Location Data...Reverse GeoCoding, Filter by the location, and use the Metadata Panel, etc...IMatch gives us so many options for doing things!

So it's really not worth it to add that additional functionality when "manually" applying a location.
--Tony

Mario

Making assumptions about what users expect is always risky and, usually, totally wrong.

Generally, if users want me to change something, the tell me in community posts or feature requests. Most users prefer simple and don't give too much thoughts about technical things. I also prefer to keep things simple, because metadata is super-complex, IMatch has to deal with crappy, incomplete, out-of-sync and broken metadata all the time. And that for millions and millions of files produced over the past 30 years.


So far no user told me that when he applies a GPS location to files via the map panel that the existing coordinates should not be changed when they by accident exist and fall within the area covered by the location (and maybe even some fuzzy border range). I guess most users use locations to add GPS coordinates to files which don't have coordinates. And don't mix files with and without, or just don't care and use the simplest way to get their files geocoded.

If you need super-special GPS stuff, I suggest you look at the free GeoSetter application - which does only that and with many bells and whistles. Great tool for people who know more about GPS than I do.

Feel free to add a feature request when you want a change. This will tell me if I should consider changes or addition for one of the IMatch 2020 releases.
I'm at 120% utilization with IMatch 2020 at the moment and about 10 pending support / bug topics, where each may take hours or even days to process...
I haven't made changes to the GPS stuff for a long time and I'm no longer 'in' the topic. I need to schedule time to get re-acquainted first, and, my guess, currently my time is better spent with getting IMatch 2020 finished.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

I must say that case 3 from Tveloso is the reason why I don't use locations.
I often have a number of images taken at a certain "location" like a zoo, a village, a woodland that has a name, etc. I absolutely want to maintain the exact GPS coordinates already in my files for each image, and yet assign the same name of the location to all of them. I can't do that in this case.

jch2103

Quote from: Carlo Didier on November 23, 2019, 09:06:08 PM
I must say that case 3 from Tveloso is the reason why I don't use locations.
I often have a number of images taken at a certain "location" like a zoo, a village, a woodland that has a name, etc. I absolutely want to maintain the exact GPS coordinates already in my files for each image, and yet assign the same name of the location to all of them. I can't do that in this case.

My solution to that is to have a set of metadata templates that just apply country/state/city/location for a limited number of places I use a lot, for example the Denver Zoo. I just use a limited number of these templates (so no need to scroll up or down a long list) and no interference with exact GPS coordinates.  I find that simpler for my situation than using Locations.
John

Tveloso

Carlo/John:

Having Locations applied via a Metadata Template does cover case 3 though.

I have a Metadata Template that has the Location Option set to Automatic:



...and that Metadata Template is then set to be applied for newly indexed files in Edit>Preferences>Indexing:



So newly indexed files, that contain GPS coordinates that fall within a Location defined in IMatch, will automatically have their Location Tags populated at ingest...and by virtue of the Keyword Variables defined in the Location(s), these files also get a set of Hierarchical Keywords assigned also.

And the GPS coordinates originally contained in the Files are retained this way.

The only issue is with the Location Shown coordinates that get added to a file as part of that operation...as discussed in this topic:

https://www.photools.com/community/index.php?topic=9499.0

...which Mario has moved to a bug report, and will be fixing for an upcoming release.
--Tony

Mario

As I aid, I'm not sure that this is a bug. By default and XMP/MWG rules, the location shown is the location to set when there is no other location.
The location created should be set by the camera, not later by a software. This is the complex if there is created / shown / both then set created/shown/both, in various combinations.

On the other hand, there are many (old and new) software produces out there which only supported the created coordinate, but not shown. Hence I may have decided, when I developed this 18 months ago or so, too set both coordinate pairs in this situation. To keep the data compatible with older applications but also prepare the coordinates for optimal use in IMatch. I don't recall anymore, just the many discussions we had at that time.

I've moved this to bug reports to park it. When I have some spare time I will re-learn all the details and then look into this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Mario:

Although the title of the other topic (that you have parked in the Bug Reports board for later review) was to question whether or not the Destination Tags should be added, that was really more me questioning whether "I liked" that idea. 

My initial impression was that I would only want to have the Shown Tags appearing in images where the Camera Standpoint and the Subject were far apart...and for them to not be included in most files.  But if their inclusion is part of MWG guidelines or other standards, then I would certainly accept that.  I imagine that you have much more to consider in this area than I realize.

The part that I thought might possibly be a bug though, is that when an IMatch Location is applied via a MD Template, the Shown coordinates are set per the location's Center Point (which can make it appear that the Camera Standpoint and Subject were far apart).  I would expect that when the Shown coordinates are added, they would be the same as the Created coordinates (that's what happens with Reverse GeoCoding).

I'll add a post to the other topic, to point out that specific question/concern, so that when you are able to get back to it, the title of the topic doesn't distract from the bit that I'm actually proposing might possibly be a bug...
--Tony

Carlo Didier

Quote from: Mario on November 24, 2019, 07:58:42 AM
The location created should be set by the camera, not later by a software.
True, but most cameras still don't have a built-in GPS, so I suppose that most people later assign GPS coordinates, either upon import (as I do with Downloader Pro which syncs my images with my GPX log files), or in iMatch, Lightroom, Geosetter, etc.
When syncing with GPS logs, logically we have the location taken (as the GPS logger is where the camera is).
When manually assigning coordinates by pointing on a map, the user should have the choice, because he could either enter the camera location or the location of the subject shown, or even both!