Infinite recursivity in CRS.findMathTransform(...) when (longitude,latitude) axis order is forced

Description

CoordinateOperationAuthorityFactory.createFromCoordinateReferenceSystemCodes(source, target) produces a StackOverflowError when the following conditions are meet:

  • (longitude, latitude) axis order is forced on a system-wide basis using the "org.geotools.referencing.forceXY" system property.
    * A SQL-backed EPSG factory (like the epsg-hsql plugin) is in the classpath.

Initial investigation suggests that Geotools get trapped in infinite recursivity with method calls bouncing between AuthorityBackedFactory and OrderedAxisAuthorityFactory (indirectly, since there is many level of indirection). The following code reproduces the problem:

Exception {
);
CoordinateReferenceSystem crs1 = CRS.decode();
CoordinateReferenceSystem crs2 = CRS.decode();
.out.println(CRS.findMathTransform(crs1, crs2));
}

Environment

None

Activity

Show:
codehaus
April 10, 2015, 3:29 PM

CodeHaus Comment From: desruisseaux - Time: Tue, 13 Feb 2007 23:12:03 -0600
---------------------
An initial fix attempt has been commited on trunk as of revision 24385. More test are needed.

codehaus
April 10, 2015, 3:29 PM

CodeHaus Comment From: aaime - Time: Wed, 14 Feb 2007 04:00:25 -0600
---------------------
Just tested on Geoserver trunk, it seems to work fine. Thank you

codehaus
April 10, 2015, 3:29 PM

CodeHaus Comment From: desruisseaux - Time: Wed, 14 Feb 2007 15:07:17 -0600
---------------------
Merged on 2.3 branch as of revision 24397. Thanks for the feedback.

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

Highest
Configure