1t.rast.neighbors(1)         GRASS GIS User's Manual        t.rast.neighbors(1)
2
3
4

NAME

6       t.rast.neighbors   - Performs a neighborhood analysis for each map in a
7       space time raster dataset.
8

KEYWORDS

10       temporal, aggregation, raster, time
11

SYNOPSIS

13       t.rast.neighbors
14       t.rast.neighbors --help
15       t.rast.neighbors  [-nr]   input=name   output=name    [where=sql_query]
16       [size=integer]   method=string  basename=string  [suffix=string]   [se‐
17       mantic_labels=string]    [nprocs=integer]     [--overwrite]    [--help]
18       [--verbose]  [--quiet]  [--ui]
19
20   Flags:
21       -n
22           Register Null maps
23
24       -r
25           Ignore the current region settings and use the raster map regions
26
27       --overwrite
28           Allow output files to overwrite existing files
29
30       --help
31           Print usage summary
32
33       --verbose
34           Verbose module output
35
36       --quiet
37           Quiet module output
38
39       --ui
40           Force launching GUI dialog
41
42   Parameters:
43       input=name [required]
44           Name of the input space time raster dataset
45
46       output=name [required]
47           Name of the output space time raster dataset
48
49       where=sql_query
50           WHERE  conditions  of SQL statement without ’where’ keyword used in
51           the temporal GIS framework
52           Example: start_time > ’2001-01-01 12:30:00’
53
54       size=integer
55           Neighborhood size
56           Default: 3
57
58       method=string [required]
59           Aggregate operation to be performed on the raster maps
60           Options: average, median, mode, minimum,  maximum,  range,  stddev,
61           sum,  count,  variance,  diversity,  interspersion, quart1, quart3,
62           perc90, quantile
63           Default: average
64
65       basename=string [required]
66           Basename of the new generated output maps
67           A numerical suffix separated by an underscore will be  attached  to
68           create a unique identifier
69
70       suffix=string
71           Suffix  to  add at basename: set ’gran’ for granularity, ’time’ for
72           the full time format, ’num’ for numerical suffix  with  a  specific
73           number of digits (default %05)
74           Default: gran
75
76       semantic_labels=string
77           Set semantic labels
78           Options: input, method
79           Default: input
80           input: copy semantic labels from input to output
81           method:  append  method  name to input label if existing, otherwise
82           use method name
83
84       nprocs=integer
85           Number of r.neighbor processes to run in parallel
86           Default: 1
87

DESCRIPTION

89       t.rast.neighbors performs r.neighbors computations on  the  maps  of  a
90       space time raster dataset (STRDS). This module supports a subset of op‐
91       tions that are available in r.neighbors. The size of  the  neighborhood
92       and the aggregation method can be chosen.
93
94       The  user must provide an input and an output space time raster dataset
95       and the basename of the resulting raster maps. The resulting STRDS will
96       have  the same temporal resolution as the input dataset.  All maps will
97       be processed using the current region settings.
98
99       The user can select a subset of the input space time raster dataset for
100       processing  using a SQL WHERE statement. The number of CPU’s to be used
101       for parallel processing can be specified  with  the  nprocs  option  to
102       speedup the computation on multi-core system.
103
104       Semantic labels are needed to relate output raster maps to input raster
105       maps. E.g. with method=stddev, the user needs to know the  spatial  ex‐
106       tent,  the  time stamp and the semantic label to determine which stddev
107       map corresponds to which input map.
108

EXAMPLE

110       To smooth the maps contained in a space time dataset run:
111       t.rast.neighbors input=tempmean_monthly output=smooth_tempmean_monthly \
112                        basename=tmean_smooth size=5 method=average nprocs=4
113       # show some info about the new space time dataset
114       t.info smooth_tempmean_monthly
115        +-------------------- Space Time Raster Dataset -----------------------------+
116        |                                                                            |
117        +-------------------- Basic information -------------------------------------+
118        | Id: ........................ smooth_tempmean_monthly@climate_2000_2012
119        | Name: ...................... smooth_tempmean_monthly
120        | Mapset: .................... climate_2000_2012
121        | Creator: ................... lucadelu
122        | Temporal type: ............. absolute
123        | Creation time: ............. 2014-11-27 11:41:36.444579
124        | Modification time:.......... 2014-11-27 11:41:39.978232
125        | Semantic type:.............. mean
126        +-------------------- Absolute time -----------------------------------------+
127        | Start time:................. 2009-01-01 00:00:00
128        | End time:................... 2013-01-01 00:00:00
129        | Granularity:................ 1 month
130        | Temporal type of maps:...... interval
131        +-------------------- Spatial extent ----------------------------------------+
132        | North:...................... 320000.0
133        | South:...................... 10000.0
134        | East:.. .................... 935000.0
135        | West:....................... 120000.0
136        | Top:........................ 0.0
137        | Bottom:..................... 0.0
138        +-------------------- Metadata information ----------------------------------+
139        | Raster register table:...... raster_map_register_ea1c9a83524e41a784d72744b08c6107
140        | North-South resolution min:. 500.0
141        | North-South resolution max:. 500.0
142        | East-west resolution min:... 500.0
143        | East-west resolution max:... 500.0
144        | Minimum value min:.......... -6.428905
145        | Minimum value max:.......... 18.867296
146        | Maximum value min:.......... 4.247691
147        | Maximum value max:.......... 28.767953
148        | Aggregation type:........... None
149        | Number of registered maps:.. 48
150        |
151        | Title:
152        | Monthly precipitation
153        | Description:
154        | Dataset with monthly precipitation
155        | Command history:
156        | # 2014-11-27 11:41:36
157        | t.rast.neighbors input="tempmean_monthly"
158        |     output="smooth_tempmean_monthly" basename="tmean_smooth" size="5"
159        |     method="average" nprocs="4"
160        |
161        +----------------------------------------------------------------------------+
162       # now compare the values between the original and the smoothed dataset
163       t.rast.list input=smooth_tempmean_monthly columns=name,start_time,min,max
164       name|start_time|min|max
165       tmean_smooth_1|2009-01-01 00:00:00|-3.361714|7.409861
166       tmean_smooth_2|2009-02-01 00:00:00|-1.820261|7.986794
167       tmean_smooth_3|2009-03-01 00:00:00|2.912971|11.799684
168       ...
169       tmean_smooth_46|2012-10-01 00:00:00|9.38767|18.709297
170       tmean_smooth_47|2012-11-01 00:00:00|1.785653|10.911189
171       tmean_smooth_48|2012-12-01 00:00:00|1.784212|11.983857
172       t.rast.list input=tempmean_monthly columns=name,start_time,min,max
173       name|start_time|min|max
174       2009_01_tempmean|2009-01-01 00:00:00|-3.380823|7.426054
175       2009_02_tempmean|2009-02-01 00:00:00|-1.820261|8.006386
176       2009_03_tempmean|2009-03-01 00:00:00|2.656992|11.819274
177       ...
178       2012_10_tempmean|2012-10-01 00:00:00|9.070884|18.709297
179       2012_11_tempmean|2012-11-01 00:00:00|1.785653|10.911189
180       2012_12_tempmean|2012-12-01 00:00:00|1.761019|11.983857
181

SEE ALSO

183        r.neighbors, t.rast.aggregate.ds,  t.rast.extract,  t.info,  g.region,
184       r.mask
185

AUTHOR

187       Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
188

SOURCE CODE

190       Available at: t.rast.neighbors source code (history)
191
192       Accessed: Saturday Jan 21 21:17:05 2023
193
194       Main index | Temporal index | Topics index | Keywords index | Graphical
195       index | Full index
196
197       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
198
199
200
201GRASS 8.2.1                                                t.rast.neighbors(1)
Impressum