Hello Cal,

Sorry for the long delay in replying to your message. Please see my
reply to Nick's related post (today) where I mention the possibility
of using image operators from the jai-tools project
(http://code.google.com/p/jai-tools/)

In particular, I think you could accomplish what you want to do using
the ZonalStats operator with a JAI ROIShape object to represent your
clipping polygon.

The ZonalStats operator was being ported to GeoTools (see the
unsupported/jai-tools module in svn) by Simone and Daniele. I don't
know if it's usable yet but, if not, you could use the ZonalStats
operator from jai-tools directly on the backing image of a grid
coverage.

If you try this approach please let us know how you go.

Michael


On 1 October 2010 00:27, Calogero Zarbo <[email protected]> wrote:
> Hello,
> i need some help about how to clip a raster using GeoTools 2.6.1 Library.
> I have a FeatureCollection (took from PostGis or from a simple ShapeFile), 
> where i can retrieve the single Features, and i need for all of them to clip 
> the corrispondent part of the raster and compute the average value of the 
> clipped area.
>
> Note that the Feature's bounds to clip in the raster, could be a complex 
> Polygon with many sides.
> Is there enyone that know a solution for that kind of problem?
>
> Best Regards,
>
>
> Cal
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to