John, which version of GeoServer does this work in?

I looked into this a bit as well. I *believe* that the root issue is an
ArrayIndexOutOfBounds exception inside the IHSColorSpace conversion, which
occurs using either JAI or JAIEXT.

https://gist.github.com/dvntucker/b5198a7f7143c234a0613e03bb2970d3

I get the same exception in the JAIEXT version of IHSColorSpace as well.
This class is reading is reading past the raster bounds, which leads me to
believe there is something wrong with the Image Layout when doing the IHS
conversion.

One thing I did notice is that ContrastEnhancementNode is re-using the same
Hints over and over again, calling ImageWorker.setHints before every
operation:

https://github.com/geotools/geotools/blob/master/modules/library/render/src/main/java/org/geotools/renderer/lite/gridcoverage2d/ContrastEnhancementNode.java

I'm not totally sure this is the correct way to use ImageWorker? As I
understand it from looking at the code, ImageWorker updates its own Hints
after each call in order to track the updated image layout. I _think_
calling setRenderingHints each time might be causing issues? However, when
I tried to remove all these calls it didn't seem to fix the issue, so I
don't know for sure.

It's also possible that the issue is simply a bug in the IHSColorSpace
conversion. Possibly a simple off by one error? I didn't look too closely
at the code to discern whether there might be an issue here. The bug is
replicated in both the Java and EXT versions, so I assumed not, but it's
worth looking at.

On Thu, Nov 9, 2017 at 8:04 AM, John Schulz <jsch...@boundlessgeo.com>
wrote:

> Hi Daniele, and all,
>
> I'm looking into an issue involving a contrast enhancement bug for 3 and 4
> band rasters found here: https://osgeo-org.atlassian.net/browse/GEOT-5860
>
> In tracking down the bug it appears to be a regression.  I think that the
> issue stems from the IHS colorspace conversion section of the
> ContrastEnhancementNode, where the parameters of the image and the raster,
> at the very least, appear to get out of synch.
>
> I'm just looking to start a conversation as I get more familiar with issue
> and hoping to get some insight into when this regression came along.
>
> Cheers,
>
> John
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to