Farber, Saul (EEA) a écrit :
> To do this, I added a few keys to the ALIASES map, something like the
> following:
>
> ALIASES.put("x", EASTING);
> ALIASES.put("y", NORTHING);
> ALIASES.put("easting", EASTING);
> ALIASES.put("northing", NORTHING);
>
> I had hoped that this would allow the axis comparison logic to 'find' the
> relationship between "x" and "easting"
>
> However, after adding this code, I have unveiled another problem. When
> initializing the sde-returned CRS (see first email) I get the following
> exception:
>
> ...
> Caused by: java.lang.IllegalArgumentException: Direction "DISPLAY_RIGHT" is
> inconsistent with axis "x".
> at org.geotools.referencing.cs.AbstractCS.<init>(AbstractCS.java:209)
> at
> org.geotools.referencing.cs.DefaultAffineCS.<init>(DefaultAffineCS.java:113)
> at
> org.geotools.referencing.cs.DefaultCartesianCS.<init>(DefaultCartesianCS.java:209)
> at
> org.geotools.referencing.cs.DefaultCartesianCS.<clinit>(DefaultCartesianCS.java:138)
I tried exactly the same too, and got exactly the same exception. After a little
bit of investigation, it appears that "x" and "y" are too generic name. Using it
as alias bring confusion in other part of the referencing module. Even if we fix
the above-cited exception, after that we hit other problems (test failures
related to PredefinedCS.standard(...) which is no longer able to distinguish
between DefaultCartesianCS.PROJECTED and DefaultCartesianCS.GENERIC_2D, because
of the alias).
The problem is that "x" may means "x", "geocentric x", "easting", "westing",
"display right", "display left", etc., so when we put it as alias, confusion
sudently popup in many places ("latitude" and "geodetic latitude" should be the
same, but "easting", "geocentric x" or "display right" are really not the same).
So the alias issue is more tricky than I initially though. I'm doing some
attempts in order to see if we can handle "x", "y" and "z" names in a special
way since we can not put them in the ALIASES map.
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel