(Sextante) RasterImage. I had to revert some changes I did in these days.
Mostly connected to cell query. The reason: Roberto Rossi, from Univ, of Padua,
who worked as my tester found some blurring on display discrete DEMs (Dem with
classes) and the cell query was quite slow and displaying wrong info (possibily
due to a delay on the reading process, the read values were "jumping" from the
original position to the click point. To summerize with these last modification
a) OJ opens and display both test tiff (small_earth.tif and AsterDEM). In some
cases, large file, user needs to zoom one or two times to the layer to
accellerate the display process. If I load several big files and then I load
AsterDEM, this is not displayed (the reasons? Memory, ImageIO readers?).
Blurring was solved
b) info tools on the cell finally works well on AsterDEM fine, they don't work
fine with small_earth.tif).
c) in both cases I cannot extract a part of the image (draw fence-extract part
of image). I didn't explore the reason. AFAIR this tool at the beginning had
problems when Alberto de Luca changed RasterImage framework.
I think I will stop making changes. Roberto goes on to do few test as his
course (where he uses OJ) starts the 1 of October - to late to move to OJ
1.16.
The essential change on the Raster Framework
- OJ 1.15, on decoding TIF file, was using JAI. Actual NB version is using JAI
Image I/O and takes advance of Ede's class GeoReferencedRaster which iseems to
be quite versatile (JAI, SUN and Geosolutions ImageIO, GDAL)
- I understood that to display an Image on the view depends on the quantity of
memory available (see method RasterImageLayer.create(..). BufferedImage
RasterImageLayer.stretchImageValuesForDisplay() seemed to fail with
small_earth.tif so I added a try/catch statement on RasterImageLayer.create(..)
that, in case of stretchImageValuesForDisplay() failure it uses
getImageForDisplay() for BufferedImage
---
** [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:** Sun Sep 06, 2020 10:02 PM 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