I have the same problem.
Both gt-epsg-hsql and gt-referencing are in my pom.xml:
[INFO] +- org.geotools:gt-epsg-hsql:jar:2.6.4:compile
[INFO] | \- hsqldb:hsqldb:jar:1.8.0.7:compile
[INFO] +- org.geotools:gt-referencing:jar:2.6.4:compile
[INFO] | +- java3d:vecmath:jar:1.3.2:compile
[INFO] | +- commons-pool:commons-pool:jar:1.5.3:compile
[INFO] | \- org.geotools:gt-metadata:jar:2.6.4:compile
[INFO] | +- org.opengis:geoapi:jar:2.3-M1:compile
[INFO] | +- org.opengis:geoapi-pending:jar:2.3-M1:compile
[INFO] | \- net.java.dev.jsr-275:jsr-275:jar:1.0-beta-2:compile
- If I use the following import:
import org.geotools.referencing.CRS;
- and try to run the line:
CoordinateReferenceSystem crs = CRS.decode("ESPG:4326");
- then I get the error:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
CoordinateReferenceSystem cannot be resolved to a type
- If instead I use:
import org.opengis.referencing.crs.CoordinateReferenceSystem;
- then I get the error:
Exception in thread "main"
org.opengis.referencing.NoSuchAuthorityCodeException: Authority "ESPG" 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)
Can anyone help?
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Exception-in-CoordinateReferenceSystem-tp5087708p5308286.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users