Ryan, Shouldn't the code be EPSG:xxxxxx rather than ESRI:xxxxxx?
Doug -----Original Message----- From: Ryan McKinley [mailto:[email protected]] Sent: 08 December 2009 20:04 To: [email protected] Subject: [Geotools-gt2-users] CRS.decode( "ESRI:102267" ) problem? 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.getAuthorityFact ory(ManyAuthoritiesFactory.java:466) at org.geotools.referencing.factory.ManyAuthoritiesFactory.getCRSAuthorityF actory(ManyAuthoritiesFactory.java:547) at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinat eReferenceSystem(AuthorityFactoryAdapter.java:798) at org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordina teReferenceSystem(ThreadedAuthorityFactory.java:729) at org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferen ceSystem(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 This email is from Ikon Science Ltd. It may contain confidential or privileged information and is for use only by the intended recipient(s). If you have received it in error, please reply and delete all copies from your system. It is your responsibility to conduct your own virus checks on all parts of this email. ------------------------------------------------------------------------------ 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
