Please try OJ 6410

---

** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image**

**Status:** open
**Milestone:** OJ_1.16
**Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud
**Last Updated:** Wed Sep 02, 2020 09:28 AM UTC
**Owner:** nobody
**Attachments:**

- 
[small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif)
 (240.6 kB; image/tiff)


I often have a bad experience trying to read simple geotiff. To have a more 
objective view of the situation, I get a very simple image from the test 
directory of GDAL library and tested it against all our drivers.
Image is attached. Here are its main characteristics (I think they are very 
common one) :
small_world.tif 
size : 400 x 200
Coordinate System : wgs84 (4326)
Metadata : AREA_OR_POINT=AREA
Image Structure Metadata : INTERLEAVE=BAND
3 bands, Block=400x20, Type=Byte, ColorInterp=RGB

I tried to import it with all the image drivers we propose (8 from Open File + 
ImageRaster Sextante). 3 drivers only could import the image. All others fail 
throughing a rough java exception. Image Raster don't fail immediately, but it 
does not display the image and throws NPE if one try to get more information. 

List of success/failures and exceptions thrown

  Referenced Image (ImageIO[ext],JAI) : OK
  ImageIO TIFF Image Reader version 1.0 : OK
  ImageIO TIFF Image Reader version 1.1 : OK
  Standard TIFF Image Reader 
        java.lang.IllegalAccessException: class 
com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access 
class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) 
because module java.desktop does not export com.sun.imageio.plugins.tiff to 
unnamed module @12405818
        at 
java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
        at 
java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99)
        at java.base/java.lang.Class.newInstance(Class.java:579)
        at 
com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236)
        at 
com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117)
  Referenced Image (JAI TIF)
        java.lang.NullPointerException java.lang.NullPointerException at 
com.sun.media.jai.util.SunCachedTile.<init>(SunCachedTile.java:80) 
        at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) 
        at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) 
        at javax.media.jai.OpImage.getTile(OpImage.java:1142) 
        at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) 
        at 
javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) 
        at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) 
        at 
com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) 
        at javax.media.jai.OpImage.getTile(OpImage.java:1129) 
        at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) 
        at 
com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132)
 at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) 
        at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) 
        at 
javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) 
        at 
javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) 
        at 
com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285)
 
        at 
com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61)
  Referenced Image (JAI TIF) : same error
  
  Buffered Image (common) : 
        com.vividsolutions.jump.workbench.imagery.ReferencedImageException: 
java.lang.ArrayIndexOutOfBoundsException: Index 8000 out of bounds for length 
8000
        at 
com.vividsolutions.jump.workbench.imagery.graphic.CommonsImage.initImage(CommonsImage.java:112)
        at 
com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.computeEnvelope(AbstractGraphicImage.java:122)
        at 
com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.getEnvelope(AbstractGraphicImage.java:114)
        at 
com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:125)
        at 
com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:106)
        at 
com.vividsolutions.jump.workbench.imagery.ReferencedImageFactoryFileLayerLoader.createImageFeature(ReferencedImageFactoryFileLayerLoader.java:199)
        at 
com.vividsolutions.jump.workbench.imagery.ReferencedImageFactoryFileLayerLoader.open(ReferencedImageFactoryFileLayerLoader.java:102)
        at 
org.openjump.core.ui.plugin.file.open.OpenFileWizard.run(OpenFileWizard.java:164)
  GeoTIFF plus (JAI) :
        java.lang.NullPointerException java.lang.NullPointerException at 
com.sun.media.jai.util.SunCachedTile.<init>(SunCachedTile.java:80) 
        at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) 
        at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) 
        at javax.media.jai.OpImage.getTile(OpImage.java:1142) 
        at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) 
        at 
javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) 
        at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) 
        at 
com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) 
        at javax.media.jai.OpImage.getTile(OpImage.java:1129) 
        at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) 
        at 
com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132)
 at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) 
        at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) 
        at 
javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) 
        at 
javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) 
        at 
com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285)
 
        at 
com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61)
        
  
Image Raster (Sextante) : no exception but does not display
        NPE Exception comes if one click on layer properties
        java.lang.NullPointerException
        at com.sun.media.jai.util.SunCachedTile.<init>(SunCachedTile.java:80)
        at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257)
        at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087)
        at javax.media.jai.OpImage.getTile(OpImage.java:1142)
        at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343)
        at 
javax.media.jai.RenderedImageAdapter.copyData(RenderedImageAdapter.java:163)
        at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299)
        at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525)
        at 
org.openjump.core.rasterimage.RasterImageIO.loadRasterData(RasterImageIO.java:202)
        at 
org.openjump.core.rasterimage.RasterImageLayer.getRasterData(RasterImageLayer.java:1505)
        at 
org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.setInfo(RasterImageLayerPropertiesPlugIn.java:444)
        at 
org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.infoText(RasterImageLayerPropertiesPlugIn.java:248)
        at 
org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.execute(RasterImageLayerPropertiesPlugIn.java:363)
 



---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to