decimal degree for position

Started by stonecherub, June 02, 2013, 09:44:22 PM

Previous topic - Next topic

stonecherub

Perhaps you have done this. I would like the option to display latitude and longitude in decimal degrees.  Minutes and seconds is old technology from a half century ago when I navigated airplanes using minutes (miles). Minutes requires decimals as does seconds (a second is 31 m - ten times the accuracy of my GPS) so why not decimals of the fundamental unit.


Mario

#1
IMatch 5 allows both.
By default, the Metadata Panel uses degrees:



Variables allow you to choose whether you want to see the raw data or the formatted data. Since variables are used to configure information displays, the thumbnail panels, batch processor data, slide show and viewer displays etc. you have full control how you display the data.

Below is a screen shot from the VarToy App which is a cool little IMatch app to quickly display and try out variables.



[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand

Quote from: Mario on June 02, 2013, 10:10:51 PM
IMatch 5 allows both.
By default, the Metadata Panel uses degrees:
So this can't be done at all in the Metadata Panel?  I just tried in a custom metadata panel and I couldn't.  I assume that this is a constraint of the otherwise wonderful metadata engine.

Mario

This is of course pretty specific to GPS data. For most other data elements you would not want the RAW, unformatted data.

ExifTool provides formatted and raw values for some metadata fields. For GPS, you see the different representations in my example above.
The metadata panel exclusively displays the formatted values, and also updates the formatted value in the database when the user makes a change in the metadata panel.

When IMatch writes back to the data, it sends the formatted data to ExifTool. ExifTool automatically performs the required transformations to make the values compatible with the specific format required by the given metadata and file format.

After reading the initial question from the OP I pondered to implement a new attribute for the metadata panel: "Show RAW data". This could be set by tag, like the colors and other options. But there are several potential problems here:

When the user clicks the edit field to change the data, what should IMatch display?

The RAW data, which would require a complete new set of validation and parsing routines. IMatch would also need to remember, for each metadata tag, which data it has to write back when the file is updated.

The formatted data? In this case the the displayed value would change as soon as the user clicks on it to edit.

Currently IMatch always displays the formatted value and expects input in the same format. Only the formatted value is updated in the database when the user makes changes in the metadata panel. IMatch cannot itself convert between the raw value and the formatted value because this logic is only known to ExifTool (and may change over ExifTool versions).

Until the data has been written back to the original file, the raw value and the formatted value in the database will differ after the user has edited them. If the user now can mix raw and formatted values in the metadata panel and update either once, we can run into situations. Like the user setting different values for the same tag, once in formatted and once in raw format. Note that a change like the one we talk about here is not limited to GPS coordinates, it would be global.

After thinking about all this, I decided to keep it as it is for now. When the beta runs, and many users see a problem in the default representation of values in the metadata panel, we can invest time into this. For now I opt for the tried and consistent representation.

At least from my limited experience, the ability to display the metadata values like GPS in either formatted or raw format (decimals) is much more important.

Since IMatch allows the user to select either format when he uses variables, and variables are used to configure what IMatch displays in the file window, the Slide Show, the Viewer, the File Window Tip, it's usually not a problem that the format in the metadata panel is the formatted value and input is also expected in the same format. IMatch also uses variables in many of the export functions, e.g. in the text exporter, or the Report App so you have access to the raw values there too if required.

Of course we may also run into the issue that the formatted value and the raw value are different because the user has modified the formatted value and the data has not been written to the file yet (which would synchronize both values again via ExifTool). But at least its only for display and now for editing.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

stonecherub

This is pretty low priority. I gave some thought yesterday as to how I use these numbers and decided that I don't. Position is sent to Google earth and the image thumbnail displayed at that point in a kml file. We could store positions using radians (interesting thought) and it would still work out.

jch2103

#5
If you do need to deal with decimal-degree-formatted GPS data, see GeoSetter (and attached screen shot). Given other IMatch priorities, I agree this is a pretty low priority now. 

[attachment deleted by admin]
John

JohnZeman

For those who do want to see the GPS coordinates in decimal format the app panel supports it as Mario mentioned.
(Below is a screen shot of one of my user app panels).


picolo

Cheers, Michael
__________________________________________
Intel i7 | 8GB | ATI HD5770 | OS: Win8 (64 Bits)
http://picolo-photography.com

Mario

Oi!   :)
A nice demonstration of what can be done with the cool HTML Templates and Apps supported by IMatch 5.
I take it that the little triangles mean that you have even added expandable sections. Neat!
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

That looks really nice.
Can you share your user app? I would certainly like it and I'm sure others too.

Thanks,

Heiner

bonsai

Quote from: hluxem on June 05, 2013, 01:24:47 PM
That looks really nice.
Can you share your user app? I would certainly like it and I'm sure others too.

Thanks,

Heiner

Oh yes, I would too :)

JohnZeman

Thanks all.  I intend to make my apps public at some point but at the moment I'm still tweaking them.  I'd like to make them more user friendly for customizing, plus the one shown above with the expanding/collapsing sections will reset itself to my script defaults each time you click on another thumbnail.  Haven't quite worked out how to make the JavaScript open/close settings "sticky" like the open/close sections in the Metadata panel are.

Anyway, attached are two of my apps as they are at the moment, feel free to do anything you want with them.  Just unzip the file and put everything in it into your user apps folder which on my Windows 7 64 machine is C:\ProgramData\photools.com\IMatch5\apppanel\user

Both apps are basically the same, the difference is one has the expanding/collapsing sections while the other just displays everything.



[attachment deleted by admin]

Mario

Tip: You have to save the expanded/collapsed state of your panels into  ScriptSettings, and then restore them again when your app is re-loaded.

You can see how it's down e.g. in the Report App, the GeoNames App or the VarToy app. The documentation for the ScriptSettings scripting class is valid for both IMatch 5 Basic and IMatch 5 Apps.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

#13
Neat app, John! Looks great and very useful.

(Naturally there are (the expected) issues when using your Canon settings with Nikon RAW images. ::).
This is NOT a request for any Nikon customization, though!)
John

JohnZeman

Quote from: Mario on June 05, 2013, 07:14:51 PM
Tip: You have to save the expanded/collapsed state of your panels into  ScriptSettings, and then restore them again when your app is re-loaded.

You can see how it's down e.g. in the Report App, the GeoNames App or the VarToy app. The documentation for the ScriptSettings scripting class is valid for both IMatch 5 Basic and IMatch 5 Apps.


Oh, I didn't know that, thanks Mario.  I'll look into that but I won't be able to for awhile as we're about to hit the road for 5 days and once we're back I'll only be here for a few days before we leave for New York for the rest of the month.

But I'll definitely look into using the ScriptSettings.  ;D

JohnZeman

Quote from: jch2103 on June 05, 2013, 07:41:05 PM
Neat app, John! Looks great and very useful.

(Naturally there are (the expected) issues when using your Canon settings with Nikon RAW images. ::).
This is NOT a request for any Nikon customization, though!)

Thanks jch.  I'm hoping to make the apps more flexible like the Image Info script I have (screen shot below) which lets users configure the variables they want to use at the beginning of the script.  I'm just not quite there yet though.


Mario

ScriptSettings is the way go go. This neat class allows scripts and Apps to store data in the global IMatch settings database. I use this in several scripts and all sample apps to persist settings between sessions. The usage in an app is simple:

// Set a setting
IMatchLib.getScriptSettings().Set("name of your setting","value of your setting");
...
// Get a setting
IMatchLib.getScriptSettings().Get("name of your setting");


The name of the setting is a string, and the value is also a string, which gives you great flexibility.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

I just took a quick peek at the report app script so I have a general idea of what to do now but I'm sure I'll have questions and I won't be able to get to this for most of a month as I'm literally packing my suitcases right now.

Thanks Mario.

Mario

A pleasant trip and safe return.
Let me know if you need support. Maybe the beta is even out in the public when you return...???!!! ::)
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rainforest1155

Quote from: Mario on June 06, 2013, 08:01:26 AM
Maybe the beta is even out in the public when you return...???!!! ::)
*insert rim shot*
:D

stonecherub

JohnZeman:

I was gratified to see your latitude/longitude positions formatted to five places (1.1m). Whenever I see some program display a position with 11 or 12 figures (the width of a virus), I think "Somebody wasn't paying attention in physics class." The teacher, maybe?

sinus

Best wishes from Switzerland! :-)
Markus

bonsai

John,

this is great!
As we say in Germany, "Großes Kino" ;D
And thank you very much for sharing.

Btw, have a nice trip...