java开放地理工具

4sup72z8  于 2021-07-08  发布在  Java
关注(0)|答案(0)|浏览(330)

我正在尝试测试geotools中提供的教程。
我正在尝试运行此链接中提供的以下示例https://docs.geotools.org/stable/userguide/tutorial/raster/image.html. 因为我是java新手,所以我使用intellij idea,我下载了opengeotools的JAR,并将它们添加为外部库。然后创建一个名为imagelab.java的类,并运行前面提到的链接中提供的脚本。我删除了指定包org.geotools.tutorial.raster的行;因为我想运行imagelab.java。
以下是正确的吗?
当我运行它时,我得到以下错误有什么想法吗?

Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Qt: Untested Windows version 10.0 detected!
l o g 4 c p l u s : E R R O R   N o   a p p e n d e r s   c o u l d   b e   f o u n d   f o r   l o g g e r   ( A d S y n c N a m e s p a c e ) . 
 l o g 4 c p l u s : E R R O R   P l e a s e   i n i t i a l i z e   t h e   l o g 4 c p l u s   s y s t e m   p r o p e r l y . 
 Αυγ 21, 2020 12:26:44 ΜΜ org.geotools.util.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "GridFormatFactorySpi". Cause is "ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.gce.imagemosaic.ImageMosaicFormatFactory could not be instantiated".
java.util.ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.gce.imagemosaic.ImageMosaicFormatFactory could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.geotools.util.factory.FactoryRegistry.register(FactoryRegistry.java:1041)
    at org.geotools.util.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:920)
    at org.geotools.util.factory.FactoryRegistry.lambda$scanForPlugins$3(FactoryRegistry.java:896)
    at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1553)
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
    at org.geotools.util.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:896)
    at org.geotools.coverage.grid.io.GridFormatFinder.scanForPlugins(GridFormatFinder.java:99)
    at org.geotools.coverage.grid.io.GridFormatFinder.getAvailableFormats(GridFormatFinder.java:70)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormats(GridFormatFinder.java:143)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:192)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:174)
    at ImageLab.displayLayers(ImageLab.java:129)
    at ImageLab.getLayersAndDisplay(ImageLab.java:116)
    at ImageLab.main(ImageLab.java:81)
Caused by: java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi: Provider org.geotools.imageio.netcdf.NetCDFImageReaderSpi could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:210)
    at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
    at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
    at it.geosolutions.imageio.utilities.ImageIOUtilities.replaceProvider(ImageIOUtilities.java:488)
    at org.geotools.gce.imagemosaic.ImageMosaicFormatFactory.replaceTIFF(ImageMosaicFormatFactory.java:413)
    at org.geotools.gce.imagemosaic.ImageMosaicFormatFactory.<clinit>(ImageMosaicFormatFactory.java:64)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 16 more
Caused by: java.lang.NoClassDefFoundError: si/uom/SI
    at org.geotools.referencing.operation.projection.MapProjection$AbstractProvider.<clinit>(MapProjection.java:1424)
    at org.geotools.imageio.netcdf.utilities.NetCDFUtilities.<clinit>(NetCDFUtilities.java:85)
    at org.geotools.imageio.netcdf.NetCDFImageReaderSpi.<clinit>(NetCDFImageReaderSpi.java:109)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 30 more
Caused by: java.lang.ClassNotFoundException: si.uom.SI
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 39 more

Αυγ 21, 2020 12:26:44 ΜΜ org.geotools.util.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "GridFormatFactorySpi". Cause is "ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.coverageio.jp2k.JP2KFormatFactory could not be instantiated".
java.util.ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.coverageio.jp2k.JP2KFormatFactory could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.geotools.util.factory.FactoryRegistry.register(FactoryRegistry.java:1041)
    at org.geotools.util.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:920)
    at org.geotools.util.factory.FactoryRegistry.lambda$scanForPlugins$3(FactoryRegistry.java:896)
    at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1553)
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
    at org.geotools.util.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:896)
    at org.geotools.coverage.grid.io.GridFormatFinder.scanForPlugins(GridFormatFinder.java:99)
    at org.geotools.coverage.grid.io.GridFormatFinder.getAvailableFormats(GridFormatFinder.java:70)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormats(GridFormatFinder.java:143)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:192)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:174)
    at ImageLab.displayLayers(ImageLab.java:129)
    at ImageLab.getLayersAndDisplay(ImageLab.java:116)
    at ImageLab.main(ImageLab.java:81)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI
    at javax.media.jai.ParameterBlockJAI.<init>(ParameterBlockJAI.java:178)
    at org.geotools.coverageio.jp2k.JP2KFormatFactory.<clinit>(JP2KFormatFactory.java:55)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 16 more

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.geotools.gce.geotiff.GeoTiffFormatFactorySpi.isAvailable(GeoTiffFormatFactorySpi.java:90)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
    at java.util.Iterator.forEachRemaining(Iterator.java:116)
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.geotools.coverage.grid.io.GridFormatFinder.getAvailableFormats(GridFormatFinder.java:74)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormats(GridFormatFinder.java:143)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:192)
    at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:174)
    at ImageLab.displayLayers(ImageLab.java:129)
    at ImageLab.getLayersAndDisplay(ImageLab.java:116)
    at ImageLab.main(ImageLab.java:81)

Process finished with exit code 1

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题