From: Martin Desruisseaux <martin.desruisseaux@ge...> - 2006-09-21 22:00:44
Simone Gadenz a écrit :
> I'm really new at GeoTools and I'd like to know if it would be possible
> to retrieve avlue of a raster cell falling in a polygono in any way.
There is methods for retrieving value of a cell falling at a specific
coordinate. Iterating over a polygon edge (for example) is left to user.
The method is, for example:
double Coverage.evaluate(DirectPosition, double);
This method will take care of converting the geographic DirectPosition to cell
coordinate. It manage raster tiling. Optionally, it can also performs an
interpolation (bilinear or bicubic) if the coordinate doesn't fall exactly on a
cell center. Finally, it convert pixel value to some "geophysics" value if some
transformation formula was specified at GridCoverage construction time. This is
used for example in order to transform pixel value to Sea Surface Temperature as
°C in NOAA images from Nasa.