Closed gaellafond closed 5 years ago
I finally found the solution!!
CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:3857", true);
CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326", true);
See: https://gis.stackexchange.com/questions/258020/erroneous-transformation-with-geotools#answer-258114
Fixed in 2.0.11
Sometimes, reprojections are inverted. For example, instead of getting [180, 90], GeoTools returns [90, 180]
If I run the following code
On my computer, I get the expected result:
On Porcata, GeoTools invert the coordinates: