NAME
r.bilinear - bilinear interpolation utility for raster map layers.
SYNOPSIS
r.bilinear [-q] input=name output=name [north=value] [south=value]
DESCRIPTION
r.bilinear fills a grid cell (raster) matrix with interpolated values
generated from a set of input layer data points. It uses the bilinear
interpolation method, a simple algorithm usually applied only to
completely defined raster areas (input data void of null data values).
Here the values of 4 input cells are used to define an
interpolation function of constant gradient within each rectangular area
defined by the cell centers.
User should be aware that the gradient of the interpolation functions changes
discontinuously across lines intersecting the cell centers of the input raster.
If there is a current working mask, it applies to the output
raster file. Only those cells falling within the mask will be
assigned interpolated values. The procedure for
selection of input data will consider all
input data relevant to interpolating values at the cell centers of the
current geographic region, ignoring the curent mask. Zero values of the
input raster are assumed to be real values of a continuous variable, thus
r.bilinear supports interpolation of variables that range from negative
to positive values. If input zero values are in fact nulls, the user bears
responsibility for controling the quality of the output, either through
post-interpolation editing of the output or pre-interpolation setting of the
current mask. Note that
cells of the output raster that cannot be bounded by 4 input cell centers are
set to zero (null).
The command line input is as follows:
Flags:
- -q
- specifies that r.bilinear run quietly (supressing the printing of
program messages to standard output)
Parameters:
- input=name
- Name of an input raster map layer containing
data values to apply in the interpolation.
- output=name
- Name to be assigned to new output raster map that represents
the surface generated from the data values in the input layer.
- north=value
- Input raster value for the north pole (90N). Valid for longitude-latitude
grids only.
- south=value
- Input raster value for the south pole (90S). Valid for longitude-latitude
grids only.
NOTES
The north\* and south\* parameters have been included to allow
for specific input values to be assigned to the north and/or south poles for
longitude-latitude grids. These data, if included, are used to interpolate
values for cells that are north or south of a line intersecting the cell
centers of the first or last row of input, respectively. When utilized, the
interpolation procedure will be continuous from the north and/or south
boundary of the current geographic region. This option is necessary, since
the data structure defining a raster will not allow for data to be assigned
to a cell centered at 90N or 90S. By including the option, the user can
create output surfaces that are continuous between the poles. The
interpolation will be "wrap-around" from west to east (across latitude)
only if the
input raster has an east edge identical to its west edge.
For longitude-latitude databases, the interpolation algorithm is based on
degree fractions, not on the absolute distances between cell centers. Any
attempt to implement the latter would violate the integrity of the
interpolation method.
r.bilinear may be used in some instances as an alternative to the
nearest neighbor approach inherent to r.resample. Note, however, that
the extent of non-null data area of the output raster must be less than that
of the input raster. The only exception to this occurs in the case where the
north\* and south\* parameters are utilized for longitude-latitude
rasters.
SEE ALSO
r.surf.idw
r.surf.idw2
g.region
r.resample
AUTHOR
Greg Koerper
ManTech Environmental Technology, Inc.
Global Climate Research Project
U.S. EPA Environmental Research Laboratory