[geotk] questions about GridCoverage
Pablo Rozas Larraondo
p.rozas.larraondo at gmail.com
Wed Feb 8 13:46:38 EST 2012
I've been trying to understand how the API works with GridCoverage2D slices
in 3 dimensional grids, but I'm still having some trouble.
In the Javadoc there is an example for specifying the slice to read in a
NetcdfImageReader, using both DimensionSlice's or bands. As I want to work
with GridCoverage2D rather than BufferedImage I have to use a
ImageCoverageReader, this class has a GridCoverageReadParam for specifying
destination bands in the reading process but I can't find a reference to
DimensionSlices on it... Is this the only way?
Martin Desruisseaux suggested me to use an Envelope to map the z dimension,
which uses internally the DimensionSlice class:
>>> Envelope env = new GeneralEnvelope(4); // 4-dimensional
>>> env.setRange(2, zmin, zmax);
>>> GridCoverageReadParam param = new GridCoverageReadParam();
I understand I have to use this "param" object in the reading process of
the variables but I don't see how I can choose the slice to read. Does it
have something to do with setting the right values of "zmin" and "zmax" or
it assign the different slices to different bands? How I can select only
one slice when I evaluate a point?
I also have another question regarding the evaluation of sample points in a
GridCoverage2D using interpolation: When I use the .getInterpolation()
function I get it's "Nearest", is there a way to set the interpolation to a
different method (bilinear, bicubic, etc)?
As a suggestion, I think it would be interesting to have an evaluate()
function which returns the values of the nearest or the 4 nearer grid
points and their distances to the point for implementing custom
Thanks for your help,
AEMet Analyst Forecaster
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Geotoolkit