Hi developers,
In one of my programs where I use the GeoTools referencing package (2.2.RC0) I
do coordinate transformations. I have both the HSQL and the EPSG access plugin
in my classpath. I create a CoordinateOperationFactory and then let this
copFactory fetch me a suitable transform:
Hints hints = new Hints(Hints.LENIENT_DATUM_SHIFT, lenientTransforms);
copFactory = FactoryFinder.getCoordinateOperationFactory(hints);
MathTransform mt = copFactory.createOperation(from, to).getMathTransform();
Indeed this last line returns some transform, as I can see from my own debugging
output on the console:
>From (WKT):GEOGCS["GCS_North_American_1983",
DATUM["North_American_Datum_1983",
SPHEROID["GRS_1980", 6378137.0, 298.257222101]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Lon", EAST],
AXIS["Lat", NORTH]]
To (WKT):GEOGCS["WGS84",
DATUM["WGS84",
SPHEROID["WGS84", 6378137.0, 298.257223563]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH]]
MathTransform (WKT):PARAM_MT["Molodenski",
PARAMETER["dim", 2],
PARAMETER["dx", 0.0],
PARAMETER["dy", 0.0],
PARAMETER["dz", 0.0],
PARAMETER["src_semi_major", 6378137.0],
PARAMETER["src_semi_minor", 6356752.314140356],
PARAMETER["tgt_semi_major", 6378137.0],
PARAMETER["tgt_semi_minor", 6356752.314245179]]
However while fetching the transform I get following warning logging message:
25.02.2006 12:00:18 FactoryRegistry scanForPlugins
WARNUNG: Can't load a service for category MathTransformProvider.
java.lang.NoClassDefFoundError: javax/media/jai/WarpAffine
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at sun.misc.Service$LazyIterator.next(Service.java:271)
at
org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:421)
at
org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:124)
at
org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:262)
at
org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:296)
at
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:868)
at
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:233)
at
org.geotools.referencing.operation.AuthorityBackedFactory.createOperation(AuthorityBackedFactory.java:202)
[...]
Now, what does this tell me?
a) JAI is required but not found on the running JVM
(I have it installed. Is it maybe not properly installed?)
b) The returned transform is not a correct one, just placeholder
c) Geotools cannot create a transfrom for the above CRS combination.
d) Geotools is working fine and the stack trace can be ignored.
e) This is bug GEOT-561 ("JAI dependency in CRS framework") and can be ignored.
f) I should use another version of GeoTools.
In particular, what should I do so that the stack trace doesn't show up?
Matthias Basler
[EMAIL PROTECTED]
----------------------------------------------------------------
This mail was sent through http://webmail.uni-jena.de
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel