locationtech / proj4j

Java port of the Proj.4 library for coordinate reprojection
Other
181 stars 71 forks source link

Bug fixed for EquidistantAzimuthalProjection #85

Closed Yaqiang closed 1 year ago

Yaqiang commented 1 year ago

In EquidistantAzimuthalProjection, project and projectInverse functions results are not corrected with elliptical OBLIQUE or EQUATOR setting #84. Geodesic calculation is needed in this condition, which can be done using GeographicLib-Java dependency (https://github.com/geographiclib/geographiclib-java). Also I added testEquidistantAzimuthal function for testing, and it passed.

pomadchin commented 1 year ago

Hey @Yaqiang that's pretty nice, thank you. However, I'm a bit hesistant to add an extra dep to the zero dependencies library. 🤔

Yaqiang commented 1 year ago

A possible solution is to copy the code from geographiclib-java into proj4j, just like OSGeo PROJ which transcripted the geographiclib c++ code (https://github.com/OSGeo/PROJ/blob/master/src/geodesic.c).

Yaqiang commented 1 year ago

I will try to re-commit the PR by adding geodesic code in proj4j.