locationtech / proj4j

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

Reprojection results seem to be too imprecise #105

Open julienrf opened 8 months ago

julienrf commented 8 months ago

The issue might be the same as #104.

I noticed that transforming coordinates between projections does not give very precise results.

For instance, consider the following projection:

+proj=lcc +lat_1=45.849 +lat_2=45.849 +lat_0=46.0086 +lon_0=11.4 +R=6370

Projecting the point (-472.97925020089707, -94.67829995316788) from this projection to WGS84 should give:

(5.378868945208383, 44.996568013546536)

(which is the result I get from netCDF-java or proj4js)

But it gives:

(5.3891133171636625, 44.99522341452963)

Which is ~0.01 degrees of error on the longitude, and ~0.001 of error on the latitude.