0
嘗試使用的GeoTIFF宰讀取支持GeoTiff數據時
,我無法註冊GeoTIFFDescriptor:的GeoTIFF:沒有描述的名稱爲「TIFF」被註冊
@Test
public void canGetTiffDecoder() {
Iterator<ImageReader> reader = ImageIO.getImageReadersByFormatName("tiff");
assertNotNull(reader);
assertTrue(reader.hasNext());
GeoTIFFDescriptor.register(); // this line is causing errors
}
當執行這個測試中,我得到:沒有描述符名稱「tiff」在模式「渲染」下注冊。
Exception in thread "main" java.lang.IllegalArgumentException: No descriptor by name "tiff" is registered under mode "rendered".
at javax.media.jai.OperationRegistry.registerFactory(OperationRegistry.java:1173)
at javax.media.jai.ThreadSafeOperationRegistry.registerFactory(ThreadSafeOperationRegistry.java:330)
at javax.media.jai.OperationRegistry.registerRIF(OperationRegistry.java:2176)
at org.libtiff.jai.operator.XTIFFDescriptor.register(XTIFFDescriptor.java:132)
at org.geotiff.image.jai.GeoTIFFDescriptor.register(GeoTIFFDescriptor.java:48)
at in.drifted.tiler.GeoTiffFile.main(GeoTiffFile.java:18)
我POM:
<repositories>
<repository>
<id>jai-repo</id>
<url>http://dev.mapfish.org/maven/repository/</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>javax.media</groupId>
<artifactId>jai_core</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>javax.media</groupId>
<artifactId>jai_codec</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>javax.media</groupId>
<artifactId>jai_imageio</artifactId>
<version>1.1</version>
</dependency>
<!-- installed manually -->
<!-- http://sourceforge.net/projects/geotiff-jai -->
<dependency>
<groupId>net.sf.geotiff-jai</groupId>
<artifactId>geotiff-jai</artifactId>
<version>2.0</version>
</dependency>
<!-- http://sourceforge.net/projects/xtiff-jai/ -->
<dependency>
<groupId>net.sf.xtiff-jai</groupId>
<artifactId>xtiff-jai</artifactId>
<version>0.3</version>
</dependency>
</dependencies>
JDK 1.8中,Win7
任何想法,爲什麼TIFF不能正確註冊?
謝謝,1月