locationtech / locationtech/proj4j
Transforming from "EPSG:4326" to "EPSG:3857" results in precision error
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 232
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the EPSG:4326 to EPSG:3857 transformation with Java 17 and proj4j 1.3.0 using lon = 0.0 and lat = 0.0, then inspect the projection path responsible for the y result. Done means the reported precision error is resolved and the stated transformation returns y = 0.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100