commons-imaging icon indicating copy to clipboard operation
commons-imaging copied to clipboard

Add support of GPSHPositioningError

Open Stefal opened this issue 1 year ago • 4 comments

Hi!

I'm not a Java developer at all. I've done my best to understand the code and add the support of the GPSHPositioningError tag. This tag seems available since Exif 2.3

GPSHPositioningError
This tag indicates horizontal positioning errors in meters.
Tag = 31 (1F.H)
Type = RATIONAL
Count = 1
Default = None

Note When the tag Type is ASCII, it shall be terminated with NULL.
It shall be noted carefully that since the value count includes the terminator NULL, the total
count is the number of data+1. For example, GPSLatitudeRef cannot have any values other
than Type ASCII 'N' or 'S'; but because the terminator NULL is added, the value of N is 2.

Stefal avatar Oct 17 '24 08:10 Stefal

Hello @Stefal

Thank you for your PR.

New public and protected elements should have a Javadoc comment that includes a since tag.

This PR needs a unit test to prove the change does what you think it does.

It's OK to include an image with the test as long as it is yours, or if not, its license is Apache 2.0 or compatible with the Apache license.

garydgregory avatar Oct 17 '24 11:10 garydgregory

I didn't add a Javadoc because there isn't one in the file, nor a test.

I wrote the test with the help of WebPMetadataTest.java and MetadataExample.java. I hope it's not too bad.

edit: BTW, which latest Exif release is supported ? 2.31 ?

Stefal avatar Oct 17 '24 20:10 Stefal

Hello @Stefal

Thank you for your updates.

Please run mvn before you push to run and fix all build checks.

I'm not sure which exact version of Exif we support but that would be good to document.

garydgregory avatar Oct 18 '24 19:10 garydgregory

Hello @garydgregory

I've fixed the 2 CheckStyle errors Maven reported.

Stefal avatar Oct 19 '24 13:10 Stefal

Is there anything more I need to do to get this pull request merged?

I'm not sure which exact version of Exif we support but that would be good to document.

if https://github.com/apache/commons-imaging/pull/49 was merged we could say it's v2.32 😄

Stefal avatar Oct 26 '24 08:10 Stefal

@Stefal I'll review later today or tomorrow. Ty!

garydgregory avatar Oct 26 '24 10:10 garydgregory

Thank you @garydgregory It will help me for improving jpeg metadata support in Josm and then in the panoramax project.

Stefal avatar Oct 26 '24 21:10 Stefal

@Stefal Yw!

garydgregory avatar Oct 27 '24 10:10 garydgregory