Hello all!

It stays confusing to me...

To force axis-switching, 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 Gauss-Kruger 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



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to