Hello,<br><br>I've been trying to understand how the API works with GridCoverage2D slices in 3 dimensional grids, but I'm still having some trouble.<br><br>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?<br>
<br>Martin Desruisseaux suggested me to use an Envelope to map the z dimension, which uses internally the DimensionSlice class:<br><br>>>> Envelope env = new GeneralEnvelope(4); // 4-dimensional<br>>>> env.setRange(2, zmin, zmax);<br>
>>> GridCoverageReadParam param = new GridCoverageReadParam();<br>>>> param.setEnvelope(env);<br><br>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?<br>
<br>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)?<br>
<br>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 interpolations.<br>
<br>Thanks for your help,<br><br>Pablo Rozas<br>AEMet Analyst Forecaster<br>