Closed jsandhol closed 3 years ago
Not sure if it's me doing something wrong... When running cs2cs with PROJ I get:
echo 6675487 3385780 0 | cs2cs EPSG:2393 EPSG:4326 -f %.15f 60.174995098323301 24.938895095805286 0.000000000000000
This is correct.
But when I try the same (I assume) with proj4j:
CoordinateTransformFactory ctFactory = new CoordinateTransformFactory(); CRSFactory csFactory = new CRSFactory(); CoordinateReferenceSystem crs1 = csFactory.createFromName("EPSG:2393"); CoordinateReferenceSystem crs2 = csFactory.createFromName("EPSG:4326"); CoordinateTransform trans = ctFactory.createTransform(crs1, crs2); ProjCoordinate p1 = new ProjCoordinate(); ProjCoordinate p2 = new ProjCoordinate(); p1.x = 6675487; p1.y = 3385780; trans.transform(p1, p2); System.out.println(p2.x + ", " + p2.y);
I get:
58.03298223195199, 26.844729418500016
Which is way off. Something wrong with EPSG:2393 proj4j vs proj? I have no experience on this field, just trying to use the library...
Looks like this x and y should be the other way around. Closing...
Not sure if it's me doing something wrong... When running cs2cs with PROJ I get:
This is correct.
But when I try the same (I assume) with proj4j:
I get:
Which is way off. Something wrong with EPSG:2393 proj4j vs proj? I have no experience on this field, just trying to use the library...