1r.resamp.filter(1) Grass User's Manual r.resamp.filter(1)
2
3
4
6 r.resamp.filter - Resamples raster map layers using an analytic ker‐
7 nel.
8
10 raster, resample, kernel filter, filter
11
13 r.resamp.filter
14 r.resamp.filter --help
15 r.resamp.filter [-n] input=name output=name filter=string[,string,...]
16 [radius=float[,float,...]] [x_radius=float[,float,...]]
17 [y_radius=float[,float,...]] [--overwrite] [--help] [--verbose]
18 [--quiet] [--ui]
19
20 Flags:
21 -n
22 Propagate NULLs
23
24 --overwrite
25 Allow output files to overwrite existing files
26
27 --help
28 Print usage summary
29
30 --verbose
31 Verbose module output
32
33 --quiet
34 Quiet module output
35
36 --ui
37 Force launching GUI dialog
38
39 Parameters:
40 input=name [required]
41 Name of input raster map
42
43 output=name [required]
44 Name for output raster map
45
46 filter=string[,string,...] [required]
47 Filter kernel(s)
48 Options: box, bartlett, gauss, normal, hermite, sinc, lanczos1,
49 lanczos2, lanczos3, hann, hamming, blackman
50
51 radius=float[,float,...]
52 Filter radius
53
54 x_radius=float[,float,...]
55 Filter radius (horizontal)
56
57 y_radius=float[,float,...]
58 Filter radius (vertical)
59
61 r.resamp.filter resamples an input raster, filtering the input with an
62 analytic kernel. Each output cell is typically calculated based upon a
63 small subset of the input cells, not the entire input. r.resamp.filter
64 performs convolution (i.e. a weighted sum is calculated for every
65 raster cell).
66
67 The module maps the input range to the width of the window function, so
68 wider windows will be "sharper" (have a higher cut-off frequency), e.g.
69 lanczos3 will be sharper than lanczos2.
70
71 r.resamp.filter implements FIR (finite impulse response) filtering. All
72 of the functions are low-pass filters, as they are symmetric. See
73 Wikipedia: Window function for examples of common window functions and
74 their frequency responses.
75
76 A piecewise-continuous function defined by sampled data can be consid‐
77 ered a mixture (sum) of the underlying signal and quantisation noise.
78 The intent of a low pass filter is to discard the quantisation noise
79 while retaining the signal. The cut-off frequency is normally chosen
80 according to the sampling frequency, as the quantisation noise is domi‐
81 nated by the sampling frequency and its harmonics. In general, the
82 cut-off frequency is inversely proportional to the width of the central
83 "lobe" of the window function.
84
85 When using r.resamp.filter with a specific radius, a specific cut-off
86 frequency regardless of the method is chosen. So while lanczos3 uses 3
87 times as large a window as lanczos1, the cut-off frequency remains the
88 same. Effectively, the radius is "normalised".
89
90 All of the kernels specified by the filter parameter are multiplied
91 together. Typical usage will use either a single kernel or an infinite
92 kernel along with a finite window.
93
95 Resampling modules (r.resample, r.resamp.stats, r.resamp.interp,
96 r.resamp.rst, r.resamp.filter) resample the map to match the current
97 region settings.
98
99 When using a kernel which can have negative values (sinc, Lanczos), the
100 -n flag should be used. Otherwise, extreme values can arise due to the
101 total weight being close (or even equal) to zero.
102
103 Kernels with infinite extent (Gauss, normal, sinc, Hann, Hamming,
104 Blackman) must be used in conjunction with a finite windowing function
105 (box, Bartlett, Hermite, Lanczos).
106
107 The way that Lanczos filters are defined, the number of samples is sup‐
108 posed to be proportional to the order ("a" parameter), so lanczos3
109 should use 3 times as many samples (at the same sampling frequency,
110 i.e. cover 3 times as large a time interval) as lanczos1 in order to
111 get a similar frequency response (higher-order filters will fall off
112 faster, but the frequency at which the fall-off starts should be the
113 same). See Wikipedia: Lanczos-kernel.svg for an illustration. If both
114 graphs were drawn on the same axes, they would have roughly the same
115 shape, but the a=3 window would have a longer tail. By scaling the axes
116 to the same width, the a=3 window has a narrower central lobe.
117
118 For longitude-latitude locations, the interpolation algorithm is based
119 on degree fractions, not on the absolute distances between cell cen‐
120 ters. Any attempt to implement the latter would violate the integrity
121 of the interpolation method.
122
124 g.region, r.mfilter, r.resample, r.resamp.interp, r.resamp.rst,
125 r.resamp.stats
126
127 Overview: Interpolation and Resampling in GRASS GIS
128
130 Glynn Clements
131
132 Last changed: $Date: 2016-09-19 12:29:41 +0200 (Mon, 19 Sep 2016) $
133
135 Available at: r.resamp.filter source code (history)
136
137 Main index | Raster index | Topics index | Keywords index | Graphical
138 index | Full index
139
140 © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
141
142
143
144GRASS 7.4.4 r.resamp.filter(1)