I went hunting down the change proposal and gt-coverage docs and could not
find much. I did find the following JAI-EXT tutorial <http://docs.geotools.org
jai-ext>(which is more a reference page then a step by step tutorial).


--
Jody Garnett

On 14 October 2015 at 18:26, Gabriella Turek <gabriella.tu...@niwa.co.nz>
wrote:

> Is there documentation I can read on this? I have started using it so I
> can get the correct min max
> values for ARCGrid raster is the presence of no data values.
> However, now all my styling is screwed up, and some other calculations.
> IN styling I was using the following code to take show an image with a
> white mostly transparent bg where there are no data values:
>
>   public static Style createSingleBandBGRasterStyle(double min, double max,
> double opacity) {
>
>
>     Color[] spectrum = getGBColorSpectrum(10);
>
>     ColorMap colorMap = sf.createColorMap();
>
>     StyleBuilder sb = new StyleBuilder(sf);
>
>
>     // add -9999 as novalue first
>
>     Expression whiteColorExpr = sb.colorExpression(Color.white);
>
>     Expression novalExpr = sb.literalExpression(-9999.0);
>
>     Expression zeroOpacityExpr = sb.literalExpression(0.4);
>
>     ColorMapEntry novalueEntry = sf.createColorMapEntry();
>
>     novalueEntry.setQuantity(novalExpr);
>
>     novalueEntry.setColor(whiteColorExpr);
>
>     novalueEntry.setOpacity(zeroOpacityExpr);
>
>     colorMap.addColorMapEntry(novalueEntry);
>
>
>     ColorMapEntry entry = sf.createColorMapEntry();
>
>     Expression opacityExpr = sb.literalExpression(opacity);
>
>     Expression fromColorExpr = sb.colorExpression(spectrum[0]);
>
>     Expression fromExpr = sb.literalExpression(min);
>
>     entry.setQuantity(fromExpr);
>
>     entry.setColor(fromColorExpr);
>
>
>     entry = sf.createColorMapEntry();
>
>     Expression toColorExpr = sb.colorExpression(spectrum[9]);
>
>     Expression toExpr = sb.literalExpression(max);
>
>     entry.setQuantity(toExpr);
>
>     entry.setColor(toColorExpr);
>
>     entry.setOpacity(opacityExpr);
>
>     colorMap.addColorMapEntry(entry);
>
>
>     RasterSymbolizer symb = sf.createRasterSymbolizer();
>
>     symb.setColorMap(colorMap);
>
>     symb.setName(String.valueOf(min) + "-" + String.valueOf(max));
>
>     return SLD.wrapSymbolizers(symb); //sb.createRule(symb);
>
>   }
>
> But with the flag set to true my rasters render as a single color….. Humm.
> Which leads me to believe something gets also changed in the nature of the
> underling raster image.
> Some elucidation would be greatly welcomed.
> Gaby
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to