Bryce L Nordgren a écrit :
1] Addressing an encoding issue with an authority factory is now, and
forever will be, a hack. Many hacks, actually. Everywhere in the code.
I agree and hope to avoid such hack. The first step I'm considering is to make Geotools referencing
code a little bit more "paranoiac", i.e. don't trust the authority code, always check the axis (when
available) no matter what the authority code is.
My first experiences with GEOT-854 show that misleading EPSG codes (i.e. user-specified CRS that
claims to be an authority-specified CRS but actually uses different axis order) leads to infinite
recursion loop in the referencing code until the application crash with a StackOverflowError. I will
try to fix that - this is part of my "make Geotools paranoiac" strategy mentioned above.
We can make Geotools more robust to this axis order issue, but one problem is that we can't expect
users to be as paranoiac. The infinite recursion loop encounter in Geotools could happen in some
user code too. To make a short story, it was caused by CoordinateOperationFactory receiving two CRS
with different axis order (the user CRS and the authority CRS), and invoking (indirectly) itself
again and again with the same CRS because they have the same authority code, in an attempt to find
the transformation path between those two CRS with the same authority code but actually different.
2] Distinguishing between reversed and correct encoding cannot be
accomplished with software. This problem will never be solved
programmatically.
I agree too. But in the particular case of this issue, the axis swapping is not random. It happen
(if I'm understanding correctly) for all data around the world used in the context of OGC WMS.
If we agree than starting from now, "EPSG:whatever" should be understood as being always
(longitude,latitude) axis order (as OGC decided recently in my understanding of a recent Jody's
mail), then it is a new authority factory derived from the previours "EPSG" (to be renamed) one and
we get determined behavior. The problem is that in practice, we will have the two interpretations of
"EPSG" floating around in the same application (at least because the EPSG database used for creating
CoordinateOperation uses of course the original EPSG definition), leading to the problem described
above. The work I'm currently doing in the referencing module is rather "make Geotools paranoiac"
than "add some hacks".
Martin.
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel