[GRASS-user] integration of sample.c algorithms into r.resample
Glynn Clements
glynn at gclements.plus.com
Fri Aug 18 00:40:22 EDT 2006
Paul Kelly wrote:
> >> To throw in another suggestion, how about r.resamp.interp? This it would
> >> mean it would be adjacent in the manuals to the other resampling modules
> >> (r.resample and r.resamp.rst) for anyone looking for them, and might also
> >> imply that r.resample (the only one with the full word in its name) was
> >> kind of a default, basic resampler whilst r.resamp.interp and r.resamp.rst
> >> used more advanced and/or interesting resampling methods.
> >
> > That sounds good to me.
>
> Well I would commit it to CVS if it's OK. I briefly edited the r.bilinear
> man page to create a rough manpage for r.resamp.interp (see below): are
> there any glaring errors?
> r.resamp.interp fills a grid cell (raster) matrix with
> interpolated values generated from a set of input layer
> data points. A choice of three interpolation methods is
> available; each uses the weighted values of a different
> number of adjacent cells in the input map to determine the
> value of each cell in the output map as follows:
>
> nearest neighbour (1 cell)
>
> bilinear (4 cells)
>
> bicubic (12 cells)
The bicubic method uses 16 cells (4x4).
> If there is a current working mask, it applies to the out
> put raster file.
Huh? The program I wrote doesn't explicitly use the mask, and libgis
only applies the mask to input maps, not output.
Due to the nature of the resampling methods, masked cells will end up
null due to the mask causing the corresponding input cells to be null,
not for any other reason.
If the module was extended to support other interpolation methods
which handled nulls differently, it's conceivable that an output cell
could be non-null in spite of that cell being masked.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list