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 )
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:
- Patch for Josm core
- Patch for photo_geotagging plugin
- 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)
Change History (22)
by , 5 weeks ago
Attachment: | new_exif_metadata_correlation.jpg added |
---|
comment:1 by , 5 weeks ago
Description: | modified (diff) |
---|
comment:2 by , 5 weeks ago
Component: | Core → Core image mapping |
---|---|
Keywords: | image exif metadata added |
Owner: | changed from | to
comment:3 by , 5 weeks ago
by , 11 days ago
Attachment: | osd_extended_infos.gif added |
---|
comment:4 by , 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.
follow-up: 6 comment:5 by , 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.
comment:6 by , 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.
follow-up: 8 comment:7 by , 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
follow-up: 9 comment:8 by , 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?"
follow-up: 11 comment:9 by , 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 , 8 days ago
Please rebase your patch (especially regarding your already accepted changes). The patch wont apply otherwise.
comment:11 by , 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 , 7 days ago
Attachment: | ticket_24238.patch added |
---|
comment:12 by , 7 days ago
Summary: | [WIP] Write more gps info inside jpg exif metadata → [PATCH] Write more gps info inside jpg exif metadata |
---|
comment:14 by , 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...
follow-up: 17 comment:15 by , 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:17 by , 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
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.