Michael Bedward a écrit :
> I would like to apply a neighbourhood sum operation on a coverage (ie.
> like focalsum in esri parlance) using (a) a circular mask and (b) an
> arbitrary but spatially contiguous neighbourhood.

You may consider working with JAI directly (GridCoverage2D is just a wrapper 
around a JAI image). Its look like that you want to do a convolution.

http://download.java.net/media/jai/javadoc/1.1.3/jai-apidocs/javax/media/jai/operator/ConvolveDescriptor.html

First create a KernelJAI with your mask. Then try the following:

    RenderedImage image = coverage.getRenderedImage();
    image = ConvolveDescriptor.create(image, kernel, null);

and you are done.

There is a Convolve operation in GeoTools to which is basically just a wrapper 
around JAI convolve working with GridCoverage2D:

http://javadoc.geotools.fr/snapshot/org/geotools/coverage/processing/operation/Convolve.html

        Martin

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to