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

NAME

6       r.resamp.interp   - Resamples raster map to a finer grid using interpo‐
7       lation.
8

KEYWORDS

10       raster, resample, interpolation, nearest neighbor,  bilinear,  bicubic,
11       lanczos, parallel
12

SYNOPSIS

14       r.resamp.interp
15       r.resamp.interp --help
16       r.resamp.interp input=name output=name  [method=string]   [nprocs=inte‐
17       ger]   [memory=memory in  MB]    [--overwrite]   [--help]   [--verbose]
18       [--quiet]  [--ui]
19
20   Flags:
21       --overwrite
22           Allow output files to overwrite existing files
23
24       --help
25           Print usage summary
26
27       --verbose
28           Verbose module output
29
30       --quiet
31           Quiet module output
32
33       --ui
34           Force launching GUI dialog
35
36   Parameters:
37       input=name [required]
38           Name of input raster map
39
40       output=name [required]
41           Name for output raster map
42
43       method=string
44           Sampling interpolation method
45           Options: nearest, bilinear, bicubic, lanczos
46           Default: bilinear
47           nearest: Nearest-neighbor interpolation
48           bilinear: Bilinear interpolation
49           bicubic: Bicubic interpolation
50
51       nprocs=integer
52           Number of threads for parallel computing
53           Default: 1
54
55       memory=memory in MB
56           Maximum memory to be used (in MB)
57           Cache size for raster rows
58           Default: 300
59

DESCRIPTION

61       r.resamp.interp  resamples an input raster map by interpolating between
62       the neighboring cells via a selectable resampling algorithm. All  cells
63       present  in  the neighborhood of the input raster cell must be non-null
64       to generate a non-null cell in the output raster map. A choice of  four
65       interpolation  methods is available; each uses the weighted values of a
66       different number of adjacent cells in the input map  to  determine  the
67       value of each cell in the output map as follows:
68
69           •   nearest neighbour (1 cell)
70
71           •   bilinear (4 cells)
72
73           •   bicubic (16 cells)
74
75           •   lanczos (25 cells)
76
77       This  module  is  intended  for reinterpolation of continuous data to a
78       different resolution rather than for interpolation from scattered  data
79       (use the v.surf.* modules for that purpose).
80

NOTES

82       Resampling  modules (r.resample, r.resamp.stats, r.resamp.interp, r.re‐
83       samp.rst) resample the map to match the current region settings.
84
85       Note that for bilinear, bicubic and lanczos interpolation, cells of the
86       output raster that cannot be bounded by the appropriate number of input
87       cell centers are set to NULL (NULL propagation). This could  occur  due
88       to  the  input  cells  being  outside the current region, being NULL or
89       MASKed.
90
91       For longitude-latitude locations, the interpolation algorithm is  based
92       on  degree  fractions,  not on the absolute distances between cell cen‐
93       ters.  Any attempt to implement the latter would violate the  integrity
94       of the interpolation method.
95
96   PERFORMANCE
97       By  specifying  the  number  of  parallel processes with nprocs option,
98       r.resamp.interp can run significantly faster, see benchmarks below.
99       Figure: Benchmark shows execution time for different number  of  cells.
100       See benchmark scripts in source code.
101
102       To  reduce  the  memory  requirements  to minimum, set option memory to
103       zero.  To take advantage of the parallelization,  GRASS  GIS  needs  to
104       compiled with OpenMP enabled.
105

EXAMPLE

107       Resample  elevation  raster  map  to  a higher resolution (from 500m to
108       250m; North Carolina sample dataset):
109       g.region raster=elev_state_500m -p
110       g.region res=250 -ap
111       r.resamp.interp input=elev_state_500m output=elev_state_250m \
112                       method=bilinear
113       Original 500m resolution elevation map
114
115       Resampled (bilinear) 250m resolution elevation map
116

SEE ALSO

118        g.region, r.resample, r.resamp.filter, r.resamp.rst, r.resamp.stats
119
120       Overview: Interpolation and Resampling in GRASS GIS
121

AUTHOR

123       Glynn Clements
124

SOURCE CODE

126       Available at: r.resamp.interp source code (history)
127
128       Accessed: Saturday Oct 28 18:17:54 2023
129
130       Main index | Raster index | Topics index | Keywords index  |  Graphical
131       index | Full index
132
133       © 2003-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual
134
135
136
137GRASS 8.3.1                                                 r.resamp.interp(1)
Impressum