urn:ogc:def:crs:EPSG:4326 parsing won't work if forcexy is activated
--------------------------------------------------------------------
Key: GEOT-1659
URL: http://jira.codehaus.org/browse/GEOT-1659
Project: GeoTools
Issue Type: Bug
Components: core referencing
Affects Versions: 2.5-M0
Reporter: Andrea Aime
Assignee: Martin Desruisseaux
Priority: Critical
Fix For: 2.5-M0
Parsing urn:ogc:def:crs:EPSG:4326 in GeoServer trunk has become impossible (not
sure if yesterday or the day before)
due to a change in behaviour of the referencing subsystem.
Running the following code:
{code}
package org.geotools.referencing;
import org.geotools.factory.Hints;
public class ForcedLonFailure {
public static void main(String[] args) throws Exception {
// comment out this one and it'll work
System.setProperty("org.geotools.referencing.forceXY", "true");
Hints.putSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING, "http");
System.out.println(CRS.decode("urn:ogc:def:crs:EPSG:4326"));
}
}
{code}
results in the following exception:
{code}
Exception in thread "main"
org.opengis.referencing.NoSuchAuthorityCodeException: Authority "URN" is
unknown or doesn't match the supplied hints. Maybe it is defined in an
unreachable JAR file?
at
org.geotools.referencing.factory.ManyAuthoritiesFactory.noSuchAuthority(ManyAuthoritiesFactory.java:488)
at
org.geotools.referencing.factory.ManyAuthoritiesFactory.getAuthorityFactory(ManyAuthoritiesFactory.java:466)
at
org.geotools.referencing.factory.ManyAuthoritiesFactory.getCRSAuthorityFactory(ManyAuthoritiesFactory.java:547)
at
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:753)
at
org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:728)
at org.geotools.referencing.CRS.decode(CRS.java:419)
at org.geotools.referencing.CRS.decode(CRS.java:353)
at
org.geotools.referencing.ForcedLonFailure.main(ForcedLonFailure.java:12)
{code}
This makes the wfs 1.1 and wcs 1.1 protocols unusable (they suggest the usage
of the urn syntax).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel