Modify

Opened 5 weeks ago

Closed 7 days ago

#24238 closed enhancement (fixed)

[PATCH] Write more gps info inside jpg exif metadata

Reported by: StephaneP Owned by: StephaneP
Priority: normal Milestone: 25.04
Component: Core image mapping Version:
Keywords: image exif metadata Cc:

Description (last modified by StephaneP)

A few months ago, I've started to write a patch to add more "gps" informations inside the jpg images during the image/gpx correlation.

These metadata are used in Panoramax to compute a "quality score", and available in the filters.
Example : https://api.panoramax.xyz/#focus=pic&map=17/48.523629/2.655424&pic=05f66723-a2f0-4cc3-93ea-8e0ba9df24b9&pic_score=A&speed=250&theme=default&xyz=139.57/-2.46/25 (clic on the right bottom '?' to see the metadata)

3 steps are needed:

  1. Patch for Josm core
  2. Patch for photo_geotagging plugin
  3. Patch for Apache Commons Imaging

1. Patch for Josm core

It's 80% done, and I'm open to some feedback.

About the GUI:

Right now, i've added many informations on the image viewer overlay. I'm not sure it will be accepted as is:

About the GPSProcessingMethod:

The GPSProcessingMethod metadata is a text field, without restricted entry. I made these choices:

  • Add 'GNSS' during a correlation
  • Add 'RTK_FIX'/'RTK_FLOAT' if the information is available. Other status as dgps are already stored inside GPSDifferential tag.
  • Add 'CORRELATION' because ...it's a correlation, and not a processing done directly inside the camera

A complete value could be GNSS RTK_FIX CORRELATION

Other newly managed exif metadata are:

  • GPSDOP
  • GPSDifferential
  • GPSHPositioningError
  • GPSMeasureMode
  • GPSMapDatum (with the EPSG code)
  • GPSTrack

2. Patch for photo_geotagging plugin

It is ready, but we can't merge it before step 3 is done.

3. Patch for Apache Commons Imaging

In the available release, alpha5, it's not possible to write the GPSHPositioningError tag. My pull request was merged some months ago. I'm waiting for an alpha6 release.
Then Josm should switch from the alpha5 to the alpha6 release.

Attachments (4)

new_exif_metadata_correlation.jpg (227.9 KB ) - added by StephaneP 5 weeks ago.
osd_extended_infos.gif (360.0 KB ) - added by StephaneP 11 days ago.
ticket_24238.patch (154.7 KB ) - added by StephaneP 7 days ago.
ticket_24238_javadoc.patch (4.9 KB ) - added by StephaneP 7 days ago.
javadoc for GpxImageCorrelation.java

Download all attachments as: .zip

Change History (22)

by StephaneP, 5 weeks ago

comment:1 by StephaneP, 5 weeks ago

Description: modified (diff)

comment:2 by StephaneP, 5 weeks ago

Component: CoreCore image mapping
Keywords: image exif metadata added
Owner: changed from team to StephaneP

comment:3 by stoecker, 5 weeks ago

Right now, i've added many informations on the image viewer overlay. I'm not sure it will be accepted as is:

I'm pretty sure I would not accept that. My proposal would be to add an info button (i.e. blue i, there should already be an image for that) and on mouse over display that information.

  • Does not waste space on default
  • Mouseover is fast for everybody wanting to see it (no button press, only mouse move necessary)
  • For keyboard users: I'd recommend an optional keyboard shortcut to present the mouseover as well, like
    • press key: display
    • press again: hide
    • other mouse action (or keypress?): hide

by StephaneP, 11 days ago

Attachment: osd_extended_infos.gif added

comment:4 by StephaneP, 11 days ago

I often need to have all the "extended" informations, so I chose a different solution: a button/shortcut toggle to display the basic informations or the extended one. See this animated gif:


The patch is ready. Code review is welcome, it is available here:
https://github.com/Stefal/josm/pull/3/files
Or I could upload the patch file if you prefer.

comment:5 by gaben, 11 days ago

Can you please correct the abbreviations in the comments throughout the patch? For example, GPS is written as Gps, gps and there are many others.

Otherwise I can't comment on other parts of the code, I've never used this functionality in JOSM.

in reply to:  5 comment:6 by StephaneP, 11 days ago

Replying to gaben:

Can you please correct the abbreviations in the comments throughout the patch? For example, GPS is written as Gps, gps and there are many others.

Otherwise I can't comment on other parts of the code, I've never used this functionality in JOSM.

Done with https://github.com/Stefal/josm/pull/3/commits/079fcff068a9688ba765aaa070a0f363c9ca18d0

Thank for the review.

comment:7 by stoecker, 11 days ago

Milestone: 25.04

Dop → DOP please as well. ;-) That's an abbreviation and no word.

I always have mental trouble with things like getExifGpsDop where Java Style guide and (in this case 3) abbreviations are in conflict ;-)

On first review it looked good, but I will have to take a deeper look.

https://github.com/Stefal/josm/pull/3/files
Or I could upload the patch file if you prefer.

GitHub offers nearly everything as patch. No need to upload. Simply add patch behind:
https://github.com/Stefal/josm/pull/3.patch

in reply to:  7 ; comment:8 by StephaneP, 10 days ago

Replying to stoecker:

Dop → DOP please as well. ;-) That's an abbreviation and no word.

Done with https://github.com/Stefal/josm/pull/3/commits/cda401454bf253e8289ab5783f257321a0144415

I always have mental trouble with things like getExifGpsDop where Java Style guide and (in this case 3) abbreviations are in conflict ;-)

:-D

GitHub offers nearly everything as patch. No need to upload. Simply add patch behind:
https://github.com/Stefal/josm/pull/3.patch

Oh! Thanks, I always forget all these tricks.

BTW: Now that the josm-dev ML is closed, where should I ask my questions?
My first question would be : "How to run the checkstyle-josm.xml with ant?"

in reply to:  8 ; comment:9 by stoecker, 9 days ago

Replying to StephaneP:

BTW: Now that the josm-dev ML is closed, where should I ask my questions?

Here in a (related) ticket.

My first question would be : "How to run the checkstyle-josm.xml with ant?"

"ant checkstyle". Read the build.xml to find more targets (like ant pmd, ...).

Probably for maven build similar targets exist.

comment:10 by stoecker, 8 days ago

Please rebase your patch (especially regarding your already accepted changes). The patch wont apply otherwise.

in reply to:  9 comment:11 by StephaneP, 7 days ago

Replying to stoecker:

"ant checkstyle". Read the build.xml to find more targets (like ant pmd, ...).

Probably for maven build similar targets exist.

Ok, thank you, it's what I already do. I had misunderstood the documentation and thinked I should run something else.

Please rebase your patch (especially regarding your already accepted changes). The patch wont apply otherwise.

I fell into a rebase conflicts nightmare :-/
Thus I attach the patch to this ticket.

by StephaneP, 7 days ago

Attachment: ticket_24238.patch added

comment:12 by StephaneP, 7 days ago

Summary: [WIP] Write more gps info inside jpg exif metadata[PATCH] Write more gps info inside jpg exif metadata

comment:13 by stoecker, 7 days ago

In 19387/josm:

see #24238 - support more EXIF data in image correlation

comment:14 by stoecker, 7 days ago

GpxImageCorrelation.java

That the other functions are missing Javadoc does not mean that new functions also may miss Javadoc. It means that Javadoc for older functions needs to be added!

Please provide the missing Javadoc at least for your new functions, better for the old ones as well...

comment:15 by StephaneP, 7 days ago

Ok, i'll look at this in a few hours.
And I'm afraid the patch misses a new file. I don't understand why.

comment:16 by stoecker, 7 days ago

In 19388/josm:

see #24238 - fix PMD issues

by StephaneP, 7 days ago

Attachment: ticket_24238_javadoc.patch added

javadoc for GpxImageCorrelation.java

in reply to:  15 comment:17 by StephaneP, 7 days ago

Replying to StephaneP:

Ok, i'll look at this in a few hours.

Patch with Javadoc added.

And I'm afraid the patch misses a new file. I don't understand why.

My mistake, the "missing" file was renamed to GpxImageDatumSettings.java

comment:18 by stoecker, 7 days ago

Resolution: fixed
Status: newclosed

In 19389/josm:

add missing Javadoc, fix #24238

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain StephaneP.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.