GeoTools
  1. GeoTools
  2. GEOT-1659

urn:ogc:def:crs:EPSG:4326 parsing won't work if forcexy is activated

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5-M0
    • Fix Version/s: 2.4.1, 2.5-M1
    • Component/s: referencing
    • Labels:
      None

      Description

      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:

      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"));
          }
      
      }
      

      results in the following exception:

      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)
      

      This makes the wfs 1.1 and wcs 1.1 protocols unusable (they suggest the usage of the urn syntax).

        Issue Links

          Activity

          Hide
          Martin Desruisseaux added a comment -
          Hopefully fixed on trunk as of revision 28977. However we are still lacking good test coverage, so any feedback from GeoServer would be appreciated.
          Show
          Martin Desruisseaux added a comment - Hopefully fixed on trunk as of revision 28977. However we are still lacking good test coverage, so any feedback from GeoServer would be appreciated.
          Hide
          Justin Deoliveira added a comment -
          Show
          Justin Deoliveira added a comment - Integrated in geotools-trunk #183 (See [ http://gridlock.openplans.org:8080/hudson/job/geotools-trunk/183/ ])
          Hide
          Martin Desruisseaux added a comment -
          Merged on the 2.4 branch as of revision 29058. Flag this issue as "resolved", waiting for confirmation that it works for GeoServer. Please close this issue if it produces the expected results with GeoServer.
          Show
          Martin Desruisseaux added a comment - Merged on the 2.4 branch as of revision 29058. Flag this issue as "resolved", waiting for confirmation that it works for GeoServer. Please close this issue if it produces the expected results with GeoServer.
          Hide
          Andrea Aime added a comment -
          I can confirm this one is fixed, but unfortunately another referencing issue is blocking the geoserver release now... don't know if it's a side effect of this fix or not thought
          Show
          Andrea Aime added a comment - I can confirm this one is fixed, but unfortunately another referencing issue is blocking the geoserver release now... don't know if it's a side effect of this fix or not thought
          Hide
          Andrea Aime added a comment -
          Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
          Show
          Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

            People

            • Assignee:
              Martin Desruisseaux
              Reporter:
              Andrea Aime
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: