From: Martin D. <mar...@ge...> - 2006-08-27 21:26:56
|
Stefan Steiniger a =E9crit : > I receive the follwoing error, if i do this: > >>> > code =3D "EPSG:4979"; > crs =3D FactoryFinder.getCRSAuthorityFactory( > "EPSG", null).createCoordinateReferenceSystem(code)= ; > >>> > java.lang.NullPointerException > at org.geotools.factory.FactoryRegistry.getClassLoaders(FactoryRegi= stry.java:370) This error is new to me. I looked in the FactoryRegistry source code, and= it may be caused by=20 ClassLoader.getSystemClassLoader() returning null (which is allowed accor= ding javadoc). Class=20 loaders in Java still an uneasy issue... I will commit a fix on trunk and= 2.2 branch maybe tomorrow.=20 Is there any chance you can build from trunk? > i tried to run with the src code from referencing module: > But here i got a built error for the usage off "assert" in several(!)=20 > classes > Syntax error on token "assert", assert expected Hints.java =20 > openjumptest/org/geotools/factory line 301 Make sure you provided the "-source 1.4" command line option to javac. > i tried to run the provided class CTSTutorial.java > here i got the following exception: >=20 > org.opengis.referencing.NoSuchAuthorityCodeException: This factory only= =20 > understand EPSG codes Just checked in the epsg-wkt data, and found that epsg-wkt factory doesn'= t include EPSG:4979.=20 epsg-wkt contains only a subset of the EPSG database. In order to get the= full EPSG database, use=20 epsg-hsql instead (or epsg-access or epsg-postgresql if a EPSG database i= s already installed on your=20 machine). However, doing so, you will fall in the "axis order" issue: http://docs.codehaus.org/display/GEOTOOLS/The+axis+order+issue If you need geographic coordinate reference systems with (longitude,latit= ude) axis order (at the=20 opposite of what the EPSG database said), then the above page explain how= to force that particular=20 order. But this feature is available only with Geotools 2.3. Martin. |