1r.resamp.filter(1)          GRASS GIS User's Manual         r.resamp.filter(1)
2
3
4

NAME

6       r.resamp.filter   -  Resamples raster map layers using an analytic ker‐
7       nel.
8

KEYWORDS

10       raster, resample, kernel filter, filter,  convolution,  FIR,  bartlett,
11       blackman, box, gauss, hamming, hann, hermite, lanczos, sinc
12

SYNOPSIS

14       r.resamp.filter
15       r.resamp.filter --help
16       r.resamp.filter  [-n] input=name output=name filter=string[,string,...]
17       [radius=float[,float,...]]     [x_radius=float[,float,...]]      [y_ra‐
18       dius=float[,float,...]]      [--overwrite]     [--help]     [--verbose]
19       [--quiet]  [--ui]
20
21   Flags:
22       -n
23           Propagate NULLs
24
25       --overwrite
26           Allow output files to overwrite existing files
27
28       --help
29           Print usage summary
30
31       --verbose
32           Verbose module output
33
34       --quiet
35           Quiet module output
36
37       --ui
38           Force launching GUI dialog
39
40   Parameters:
41       input=name [required]
42           Name of input raster map
43
44       output=name [required]
45           Name for output raster map
46
47       filter=string[,string,...] [required]
48           Filter kernel(s)
49           Options: box, bartlett, gauss,  normal,  hermite,  sinc,  lanczos1,
50           lanczos2, lanczos3, hann, hamming, blackman
51
52       radius=float[,float,...]
53           Filter radius
54
55       x_radius=float[,float,...]
56           Filter radius (horizontal)
57
58       y_radius=float[,float,...]
59           Filter radius (vertical)
60

DESCRIPTION

62       r.resamp.filter  resamples an input raster, filtering the input with an
63       analytic kernel. Each output cell is typically calculated based upon  a
64       small subset of the input cells, not the entire input.  r.resamp.filter
65       performs convolution (i.e. a  weighted  sum  is  calculated  for  every
66       raster cell).
67
68       The module maps the input range to the width of the window function, so
69       wider windows will be "sharper" (have a higher cut-off frequency), e.g.
70       lanczos3 will be sharper than lanczos2.
71
72       r.resamp.filter implements FIR (finite impulse response) filtering. All
73       of the functions are low-pass  filters,  as  they  are  symmetric.  See
74       Wikipedia:  Window function for examples of common window functions and
75       their frequency responses.
76
77       A piecewise-continuous function defined by sampled data can be  consid‐
78       ered  a  mixture (sum) of the underlying signal and quantisation noise.
79       The intent of a low pass filter is to discard  the  quantisation  noise
80       while  retaining  the signal.  The cut-off frequency is normally chosen
81       according to the sampling frequency, as the quantisation noise is domi‐
82       nated  by  the  sampling  frequency  and its harmonics. In general, the
83       cut-off frequency is inversely proportional to the width of the central
84       "lobe" of the window function.
85
86       When  using  r.resamp.filter with a specific radius, a specific cut-off
87       frequency regardless of the method is chosen. So while lanczos3 uses  3
88       times  as large a window as lanczos1, the cut-off frequency remains the
89       same. Effectively, the radius is "normalised".
90
91       All of the kernels specified by the filter parameter are multiplied to‐
92       gether.  Typical  usage  will use either a single kernel or an infinite
93       kernel along with a finite window.
94

NOTES

96       Resampling modules (r.resample, r.resamp.stats, r.resamp.interp,  r.re‐
97       samp.rst, r.resamp.filter) resample the map to match the current region
98       settings.
99
100       When using a kernel which can have negative values (sinc, Lanczos), the
101       -n  flag should be used. Otherwise, extreme values can arise due to the
102       total weight being close (or even equal) to zero.
103
104       Kernels with infinite  extent  (Gauss,  normal,  sinc,  Hann,  Hamming,
105       Blackman)  must be used in conjunction with a finite windowing function
106       (box, Bartlett, Hermite, Lanczos).
107
108       The way that Lanczos filters are defined, the number of samples is sup‐
109       posed  to  be  proportional  to  the order ("a" parameter), so lanczos3
110       should use 3 times as many samples (at  the  same  sampling  frequency,
111       i.e.   cover  3 times as large a time interval) as lanczos1 in order to
112       get a similar frequency response (higher-order filters  will  fall  off
113       faster,  but  the  frequency at which the fall-off starts should be the
114       same). See Wikipedia: Lanczos-kernel.svg for an illustration.  If  both
115       graphs  were  drawn  on the same axes, they would have roughly the same
116       shape, but the a=3 window would have a longer tail. By scaling the axes
117       to the same width, the a=3 window has a narrower central lobe.
118
119       For  longitude-latitude locations, the interpolation algorithm is based
120       on degree fractions, not on the absolute distances  between  cell  cen‐
121       ters.   Any attempt to implement the latter would violate the integrity
122       of the interpolation method.
123

SEE ALSO

125        g.region, r.mfilter, r.resample, r.resamp.interp, r.resamp.rst,  r.re‐
126       samp.stats
127
128       Overview: Interpolation and Resampling in GRASS GIS
129

AUTHOR

131       Glynn Clements
132

SOURCE CODE

134       Available at: r.resamp.filter source code (history)
135
136       Accessed: Mon Jun 20 16:46:23 2022
137
138       Main  index  | Raster index | Topics index | Keywords index | Graphical
139       index | Full index
140
141       © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
142
143
144
145GRASS 8.2.0                                                 r.resamp.filter(1)
Impressum