Modify

Opened 3 days ago

Closed 9 hours ago

#24278 closed enhancement (fixed)

[PATCH] Support writing to jpeg, the new EXIF GPS metadata managed in Josm

Reported by: StephaneP Owned by: team
Priority: normal Milestone:
Component: Plugin photo_geotagging Version:
Keywords: Cc:

Description

Since #24238 is merged, new GPS metadata are available in ImageEntry.
This patch add support for these new tags in the photo_geotagging plugin.
new tags:

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

!! This patch should not be merged before apache-commons plugin is updated to use apache commons-imaging 1.0.0-alpha6 !!

Question:
I simply add more parameters to setExifGPSTag. Should I overload it?

Attachments (2)

24278.patch (9.2 KB ) - added by StephaneP 3 days ago.
24278_B.patch (22.8 KB ) - added by StephaneP 29 hours ago.

Download all attachments as: .zip

Change History (14)

by StephaneP, 3 days ago

Attachment: 24278.patch added

comment:1 by stoecker, 3 days ago

You need to adapt build.xml and pom.xml to set the new minimum josm version

I simply add more parameters to setExifGPSTag. Should I overload it?

I'd pass the ImageEntry instead of extracting the data and passing it individually.

!! This patch should not be merged before apache-commons plugin is updated to use apache commons-imaging 1.0.0-alpha6 !!

alpha6 is not yet released...

in reply to:  1 ; comment:2 by StephaneP, 2 days ago

Replying to stoecker:

I'd pass the ImageEntry instead of extracting the data and passing it individually.

Thanks, I'm working on it.
I have some trouble to run the unit tests.

....\ExifGPSTaggerTest.java:61: error: cannot find symbol
    [javac]         final File in = new File(TestUtils.getTestDataRoot(), "IMG_7250_small.JPG");
    [javac]                                  ^

alpha6 is not yet released...

I know :-(
I hope this release will be available in the coming days.
The other way would be to comment the part related to GpsTagConstants.GPS_TAG_GPS_HOR_POSITIONING_ERROR until it's available:

in reply to:  2 ; comment:3 by stoecker, 41 hours ago

Hello,

I have some trouble to run the unit tests.

....\ExifGPSTaggerTest.java:61: error: cannot find symbol
    [javac]         final File in = new File(TestUtils.getTestDataRoot(), "IMG_7250_small.JPG");
    [javac]                                  ^

Hah, welcome in the club. Im using rolling release openSUSE Tumbleweed and on my system the unit test work/work not/work/work not. Each time a new error message which either goes away or not. JUnit seeems to break extremely easy. Which also means I have to rely on the server run tests to know if something is wrong in the repository (i.e. incompatible versions downloaded). I stopped to investigate, as spending hours to fix it, only to discover that the next system update again breaks it is wasted time.

For me it currently says org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests.

Sometimes when "ant test" fails "mvn test" still works. ATM for me both fail.

I don't like that at all, but I also have no solution for this.

in reply to:  3 comment:4 by StephaneP, 29 hours ago

Here is a new patch, with:

  • pom.xml and build.xml updated with the min Josm release
  • setExifGPSTag use ImageEntry instead of separate parameters
  • Various checkstyle fixes

I've search if there is a way to set a minimum version for apache-commons, but I didn't find.
In the unit test, I'd like to test the value written in the jpg file, but as I can't run these tests....

Replying to stoecker:

Hah, welcome in the club.

With mvn test there were no test detected. I had to set the classes to public (explanations found here). Then it failed with NoClassDefFoundError com/github/tomakehurst/wiremock/core/Options. I don't have the knowledge to investigate more.
If with your skill, you didn't find a way to fix all these unit test errors, I won't even try :-)

by StephaneP, 29 hours ago

Attachment: 24278_B.patch added

comment:5 by stoecker, 28 hours ago

In 36436/osm:

see #24278 - add new EXIF metadata (patch by StephaneP, modified), fix mvn test function

comment:6 by stoecker, 28 hours ago

Please try before I build a dist file. Tests should work with "mvn" now. Seems only some dependencies have been missing.

in reply to:  6 comment:7 by StephaneP, 27 hours ago

Replying to stoecker:

Please try before I build a dist file. Tests should work with "mvn" now. Seems only some dependencies have been missing.

Thank you for the update for the tests.
It still complains with a missing symbol :

cannot find symbol
[ERROR]   symbol:   variable GPS_TAG_GPS_HOR_POSITIONING_ERROR
[ERROR]   location: class org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants

GPS_TAG_GPS_HOR_POSITIONING_ERROR was added in this alpha-6 release. I will investigate more later in the week.

comment:8 by stoecker, 26 hours ago

In 36437/osm:

see #11902, #24278 - fix skipped unit test

comment:9 by stoecker, 26 hours ago

For me all tests are fine...

comment:10 by StephaneP, 18 hours ago

This morning, the tests are passing.
Thanks

comment:11 by StephaneP, 18 hours ago

Summary: [WIP] Support writing to jpeg, the new EXIF GPS metadata managed in Josm[PATCH] Support writing to jpeg, the new EXIF GPS metadata managed in Josm

comment:12 by stoecker, 9 hours ago

Resolution: fixed
Status: newclosed

Released.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.