Going back to your original method...
On 18/07/2010, at 8:08 PM, GTn00b wrote:
> 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
This looks fine to me.
> - 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
Okay I am not sure what is going on there; can you check your project build
path. The CoordinateReferenceSystem class is defined in the geoapi.jar
> - 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?
> Can anyone help?
It really feels like your classpath is wrong or otherwise having problems. You
may wish to try building carefully on the command line. If you are following
the quicksart it shows you how to create a project from scratch and run it. (In
addition to importing it into eclipse). Did these steps work for you? Or are
you skipping ahead right into your own project ...
Jody
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users