I'm trying to deploy an ascii raster format map with geotools 2.3.0. I'm
using the following code:
ArcGridReader agr = new ArcGridReader(raster);
GridCoverage2D gc2 = (GridCoverage2D)agr.read(null);
where 'raster' is an URL object containing the URL of the ascii raster.
When I run my class, I get the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at
org.geotools.gce.arcgrid.ArcGridReader.checkSource(ArcGridReader.java
:283)
at
org.geotools.gce.arcgrid.ArcGridReader.<init>(ArcGridReader.java:139)
at
org.geotools.gce.arcgrid.ArcGridReader.<init>(ArcGridReader.java:109)
at org.geotools.demo.mappane.Prueba.main(Prueba.java:47)
Caused by: java.lang.NullPointerException
at
com.sun.media.imageioimpl.common.ImageUtil.getJDKImageReaderWriterSPI
(ImageUtil.java:1366)
at
com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReaderSpi.onRegis
tration(CLibJPEGImageReaderSpi.java:114)
at
javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry
.java:698)
at
javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegi
stry.java:285)
at javax.imageio.spi.IIORegistry$1.run(IIORegistry.java:225)
at java.security.AccessController.doPrivileged(Native Method)
at
javax.imageio.spi.IIORegistry.registerInstalledProviders(IIORegistry.
java:232)
at
javax.imageio.spi.IIORegistry.registerStandardSpis(IIORegistry.java:1
67)
at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:120)
at
javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:142
)
at javax.imageio.ImageIO.<clinit>(ImageIO.java:48)
Does anyone know why I'm obtaining that exception? Or could you direct me
to useful information to load and show an ascii raster, like a tutorial o
sample code? I would thank you all a lot.
--
View this message in context:
http://www.nabble.com/Problem-with-ArcGridReader-tf3312331.html#a9212154
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users