I made several tests opening the test files attached to this post in several 
combinations.
I used:
OJ 6445 core - OJ 6445 PLUS

**OJ 6445 core** 
It opens all the files without any problem. the DEM (*AsterDEM, geotif *and 
*mdt25a*) are displayed wella nd also tool (like pixel inspection) works fine.
Before opening files. On loading OJ I recognized this new error message:

[ERROR] 13:24:49.553 Can't register JP2GDAL readers.
java.lang.NoClassDefFoundError: 
it/geosolutions/imageio/gdalframework/GDALImageReaderSpi
        at java.lang.ClassLoader.defineClass1(Native Method).....

*small-world *file is opened displayed well. Pixel inspection tool is not 
working but other tools (extract part of image, Raster properties etc) seems to 
work fine

**OJ 6445 PLUS**
*small-world *file is opened displayed well. Pixel inspection tool is not 
working but other tools (extract part of image, Raster properties etc) seems to 
work fine
*AsterDem* is opened and displayed wll with no problem to use tools
*mdta25a* is not displayed in the view even if an icon (not the correct one) is 
displayed on the layer tree. None of the tools work.
The behaviour of *geotiff *file is random. Sometimes is correctly opened and 
displayed into the view and the tools work. Other times it is not displayed  
and the tools don't work.
The most common error is this:
java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.String;
related to imageIO classes

NB *geotiff *and *mdta25a *are basically the same files. I got geotiff loading 
mdt25a into QGIS and saving back with a different name.

--*With all the files and version of OpenJUMP if the file is loaded and 
displayed well*--

a) if the layer is displayed into the view. Raster info tool works well and 
displays all the info about the raste into a table
b) if the later is outside the current view. Raster info tool gives back an 
error possibly due to the matter that Raster Color dept is checked into 
(displayed) BufferedImage (which actually is created whenever we zoom to a 
Sextante Layer. 

java.lang.NullPointerException
        at 
org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.getColorDepth(RasterImageLayerPropertiesPlugIn.java:629)
    
I suspect that the methods getColorDepth(BufferedImage..) and 
getDPI(BufferedImage..) in the class RasterImageLayerPropertiesPlugin have to 
be rewritten.
Any suggestion? I know that IIOMetadata class can do it but I have never tried. 
Or Commons imaging? 






---

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

**Status:** open
**Milestone:** OJ_future
**Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud
**Last Updated:** Sat Sep 12, 2020 10:44 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