locationtech / proj4j

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

Transforming from "EPSG:4326" to "EPSG:3857" results in precision error #104

Open mvodas opened 1 year ago

mvodas commented 1 year ago

When transforming from WGS 84 "EPSG:4326" to WGS 84 / Pseudo-Mercator "EPSG:3857" with lon = 0.0 and lat = 0.0 the result is x = 0.0 and y = -7.081154551613622E-10. The correct value for y should be 0.0, but there is a precision error. Apache SIS gives the correct result. The precision error is there with all other lon/lat inputs that I have tried. I use Java 17 and proj4j 1.3.0. Is there any explanation on this or plans for a fix?