From: Jody G. <jod...@gm...> - 2009-06-29 23:27:42
|
It extracts a database into your temp directory; if you are in a high security sandbox you (such as an applet) you may need to use the epsg-wkt plugin instead. Details on this choice in the user guide. Jody On Tue, Jun 30, 2009 at 5:30 AM, Alexander Weidauer<ale...@hu...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dear List, > > I use geotools 2.5.5 under Suse Linux 10.2 64Bit and within the netbeans > IDE. > > I try to get a simple code running, but always get errors by > initialization the epsg system. > > 1. Is there a explanation how this mechanism works inside of geotools. > 2. I cannot find any documentation and to understand your plugin system > is not easy. > 3. What is the minimal set of jar files to use geotiff and shapefiles. > > > At the moment I try to do this > > public class Main { > > public static void main(String[] args) { > > // --- look what is inside the class path ------------ > String s = System.getProperty("java.class.path"); > String[] f = s.split(":"); > > // --- try to find the jar for coordinate system ----- > System.out.println("classpath is:"); > > for (int i = 0; i < f.length; i++) { > if (f[i].contains("epsg")) { > System.out.println("********************"); > } > > System.out.println(i + ": " + f[i]); > if (f[i].contains("epsg")) { > System.out.println("********************"); > } > > > } > // ------ try to use the epsg definitions ------------- > System.out.println("\ntry to decode EPSG 4326:\n"); > try { > CoordinateReferenceSystem crs = CRS.decode("EPSG:4326"); > System.out.println("coordinate system is:\n" + > crs.toString()); > } catch (Exception e) { > System.out.println(e.getMessage()); > } > } > } > > The execution of this code fails and give me this hints > > classpath is: > 0: /home/huckfinn/Projekte/gtools-test/lib/geoapi-2.2.0.jar > 1: /home/huckfinn/Projekte/gtools-test/lib/gt-api-2.5.5.jar > 2: /home/huckfinn/Projekte/gtools-test/lib/gt-coverage-2.5.5.jar > 3: /home/huckfinn/Projekte/gtools-test/lib/gt-cql-2.5.5.jar > 4: /home/huckfinn/Projekte/gtools-test/lib/gt-data-2.5.5.jar > ******************** > 5: /home/huckfinn/Projekte/gtools-test/lib/gt-epsg-wkt-2.5.5.jar > ******************** > ******************** > 6: /home/huckfinn/Projekte/gtools-test/lib/gt-epsg-extension-2.5.5.jar > ******************** > 7: /home/huckfinn/Projekte/gtools-test/lib/gt-geotiff-2.5.5.jar > 8: /home/huckfinn/Projekte/gtools-test/lib/gt-jdbc-2.5.5.jar > 9: /home/huckfinn/Projekte/gtools-test/lib/gt-legacy-2.5.5.jar > 10: /home/huckfinn/Projekte/gtools-test/lib/gt-main-2.5.5.jar > 11: /home/huckfinn/Projekte/gtools-test/lib/gt-metadata-2.5.5.jar > 12: /home/huckfinn/Projekte/gtools-test/lib/gt-referencing-2.5.5.jar > 13: /home/huckfinn/Projekte/gtools-test/lib/gt-render-2.5.5.jar > 14: /home/huckfinn/Projekte/gtools-test/lib/gt-sample-data-2.5.5.jar > 15: /home/huckfinn/Projekte/gtools-test/lib/gt-shapefile-2.5.5.jar > 16: /home/huckfinn/Projekte/gtools-test/lib/gt-xml-2.5.5.jar > 17: /home/huckfinn/Projekte/gtools-test/build/classes > > try to decode EPSG 4326: > > 29.06.2009 21:16:00 org.geotools.factory.FactoryRegistry scanForPlugins > WARNUNG: Can't load a service for category "MathTransformFactory". Cause > is "NoClassDefFoundError: javax/measure/converter/ConversionException". > 29.06.2009 21:16:00 org.geotools.factory.FactoryRegistry scanForPlugins > WARNUNG: Can't load a service for category "CRSAuthorityFactory". Cause > is "ServiceConfigurationError: > org.opengis.referencing.crs.CRSAuthorityFactory: Provider org (...) > org.geotools.factory.FactoryNotFoundException: No factory of kind > "MathTransformFactory" found.". > sun.misc.ServiceConfigurationError: > org.opengis.referencing.crs.CRSAuthorityFactory: Provider > org.geotools.referencing.factory.epsg.DefaultFactory could not be > instantiated: org.geotools.factory.FactoryNotFoundException: No factory > of kind "MathTransformFactory" found. > at sun.misc.Service.fail(Service.java:120) > at sun.misc.Service.access$200(Service.java:111) > at sun.misc.Service$LazyIterator.next(Service.java:276) > at > org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:829) > at > org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:773) > at > org.geotools.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:808) > at > org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:195) > at > org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:176) > at > org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:451) > at > org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:88) > at > org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69) > at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:182) > at org.geotools.referencing.CRS.decode(CRS.java:420) > at org.geotools.referencing.CRS.decode(CRS.java:348) > ............ > > > Thanx > > - -- > Alexander Weidauer > __________________ _ __ ______ ______ > / _/ __/ ____/ __ \ | / / / _/ |/ / | > / // /_/ / __/ / / / | / /_____ / // /|_/ / /| | > _/ // __/ /_/ / /_/ /| |/ /_____// // / / / ___ | > /___/_/ \____/_____/ |___/ /___/_/ /_/_/ |_| > > Institut für Geodatenverarbeitung > Informationsdienste, -modelle und -applikationen > Tel.: 038333-527 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.4-svn0 (GNU/Linux) > Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org > > iD8DBQFKSRZdMC1o6iopHygRAv97AKCCmQm1oeRTng5LFFfO1WpvTnhWXgCZAfg2 > A3h21+xvSxxHK1YccQSGybc= > =5wM3 > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > |