3
<em>t.rast.neighbors</em> performs <a href="r.neighbors.html">r.neighbors</a>
4
computations on the maps of a space time raster dataset (STRDS). This
5
module supports a subset of options that are available in
6
<a href="r.neighbors.html">r.neighbors</a>. The size of the neighborhood
7
and the aggregation method can be chosen.
9
The user must provide an input and an output space time raster dataset and
10
the basename of the resulting raster maps. The resulting STRDS will have
11
the same temporal resolution as the input dataset.
12
All maps will be processed using the current region settings.
14
The user can select a subset of the input space time raster dataset for
15
processing using a SQL WHERE statement. The number of CPU's to be used
16
for parallel processing can be specified with the <em>nprocs</em>
17
option, to speedup the computation on multi-core system.
22
To smooth the maps contained into a space time dataset run:
24
<div class="code"><pre>
25
t.rast.neighbors input=tempmean_monthly output=smooth_tempmean_monthly \
26
base=tmean_smooth size=5 method=average nprocs=4
28
# show some info about the new space time dataset
29
t.info smooth_tempmean_monthly
30
+-------------------- Space Time Raster Dataset -----------------------------+
32
+-------------------- Basic information -------------------------------------+
33
| Id: ........................ smooth_tempmean_monthly@climate_2000_2012
34
| Name: ...................... smooth_tempmean_monthly
35
| Mapset: .................... climate_2000_2012
36
| Creator: ................... lucadelu
37
| Temporal type: ............. absolute
38
| Creation time: ............. 2014-11-27 11:41:36.444579
39
| Modification time:.......... 2014-11-27 11:41:39.978232
40
| Semantic type:.............. mean
41
+-------------------- Absolute time -----------------------------------------+
42
| Start time:................. 2009-01-01 00:00:00
43
| End time:................... 2013-01-01 00:00:00
44
| Granularity:................ 1 month
45
| Temporal type of maps:...... interval
46
+-------------------- Spatial extent ----------------------------------------+
47
| North:...................... 320000.0
48
| South:...................... 10000.0
49
| East:.. .................... 935000.0
50
| West:....................... 120000.0
51
| Top:........................ 0.0
52
| Bottom:..................... 0.0
53
+-------------------- Metadata information ----------------------------------+
54
| Raster register table:...... raster_map_register_ea1c9a83524e41a784d72744b08c6107
55
| North-South resolution min:. 500.0
56
| North-South resolution max:. 500.0
57
| East-west resolution min:... 500.0
58
| East-west resolution max:... 500.0
59
| Minimum value min:.......... -6.428905
60
| Minimum value max:.......... 18.867296
61
| Maximum value min:.......... 4.247691
62
| Maximum value max:.......... 28.767953
63
| Aggregation type:........... None
64
| Number of registered maps:.. 48
67
| Monthly precipitation
69
| Dataset with monthly precipitation
71
| # 2014-11-27 11:41:36
72
| t.rast.neighbors input="tempmean_monthly"
73
| output="smooth_tempmean_monthly" base="tmean_smooth" size="5"
74
| method="average" nprocs="4"
76
+----------------------------------------------------------------------------+
79
# new now compare the values between original data and the smoothed one
80
t.rast.list input=smooth_tempmean_monthly columns=name,start_time,min,max
82
t.rast.list input=smooth_tempmean_monthly columns=name,start_time,min,max
83
name|start_time|min|max
84
tmean_smooth_1|2009-01-01 00:00:00|-3.361714|7.409861
85
tmean_smooth_2|2009-02-01 00:00:00|-1.820261|7.986794
86
tmean_smooth_3|2009-03-01 00:00:00|2.912971|11.799684
88
tmean_smooth_46|2012-10-01 00:00:00|9.38767|18.709297
89
tmean_smooth_47|2012-11-01 00:00:00|1.785653|10.911189
90
tmean_smooth_48|2012-12-01 00:00:00|1.784212|11.983857
92
t.rast.list input=tempmean_monthly columns=name,start_time,min,max
93
name|start_time|min|max
94
2009_01_tempmean|2009-01-01 00:00:00|-3.380823|7.426054
95
2009_02_tempmean|2009-02-01 00:00:00|-1.820261|8.006386
96
2009_03_tempmean|2009-03-01 00:00:00|2.656992|11.819274
98
2012_10_tempmean|2012-10-01 00:00:00|9.070884|18.709297
99
2012_11_tempmean|2012-11-01 00:00:00|1.785653|10.911189
100
2012_12_tempmean|2012-12-01 00:00:00|1.761019|11.983857
106
<a href="r.neighbors.html">r.neighbors</a>,
107
<a href="t.rast.aggregate.ds.html">t.rast.aggregate.ds</a>,
108
<a href="t.rast.extract.html">t.rast.extract</a>,
109
<a href="t.info.html">t.info</a>,
110
<a href="g.region.html">g.region</a>,
111
<a href="r.mask.html">r.mask</a>
117
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
119
<p><i>Last changed: $Date: 2014-12-26 23:44:16 +0100 (Fri, 26 Dec 2014) $</i>