Hello-

I'm trying to look up a projection that is stored in
gt-epsg-extension-2.6.0.jar.

I have the jar file in the classpath and when I call: CRS.decode(
"ESRI:102267" ), I get the exception:

org.opengis.referencing.NoSuchAuthorityCodeException: Authority "ESRI"
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:798)
        at 
org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:729)
        at 
org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)
        at org.geotools.referencing.CRS.decode(CRS.java:435)
        at org.geotools.referencing.CRS.decode(CRS.java:363)

To make sure I have the jar in the classpath, I wrote this little test app:

        String x = "102267";
        boolean hasESRI = CRS.getSupportedAuthorities( true
).contains( "ESRI" );
        System.out.println( "Has ESRI Authority: "+hasESRI );
        for( String v : CRS.getSupportedCodes( "ESRI" ) ) {
          if( v.equals( x ) ) {
            System.out.println( "Found: "+x );
          }
        }

This is the output:
  Has ESRI Authority: true
  Found: 102267

Any ideas why it is not finding the code when it hits the 'decode' section.

thanks
ryan

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to