Hello all!
It stays confusing to me...
To force axisswitching, I set the property:
> System.setProperty("org.geotools.referencing.forceXY", "true");
I create a coordinate:
> Coordinate co = new Coordinate(51.5, 6.5, 0.0); // (lat, lon)
which I transform twice:
a) EPSG:4326 (WGS84) > EPSG:31466 (i.e. Gauss Kruger / DHDN zone 2N)
Result: (2534760.547179762, 5708594.770302204, NaN)
O.K., x=easting, y=northing.
b) EPSG:4326 (WGS84) > EPSG:23032 (i.e. UTM / ED50 zone 32N)
Result: (326560.01811259676, 5708594.770302204, NaN)
O.K., x=easting, y=northing.
O.K., all look fine!
Then I start the test again, but now I do:
> System.setProperty("org.geotools.referencing.forceXY", "false")
> Coordinate co = new Coordinate(6.5, 51.5, 0.0); // (lon, lat)
Results:
a) EPSG:4326 (WGS84) > EPSG:31466 (i.e. Gauss Kruger / DHDN zone 2N)
Result: (5707390.737054074, 2534760.547179762, NaN)
O.K., easting/northing are switched.
b) EPSG:4326 (WGS84) > EPSG:23032 (i.e. UTM / ED50 zone 32N)
Result: (326560.01811259676, 5708594.770302204, NaN)
Uups, easting/northing *aren't switched*
Allthough switching is "on" and the result from GaussKruger is switched, too,
the result from UTM is *not*!
Why not??? Any explanation? How can I detect and consider that in an application?
Greetings
Erich
