| 1 | <h2>DESCRIPTION</h2> |
| 2 | |
| 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 the options that are available in |
| 6 | <a href="r.neighbors.html">r.neighbors</a>. |
| 7 | |
| 8 | <p> |
| 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. With the <b>-e</b> flag, |
| 12 | resulting maps can be registered in an existing STRDS, that e.g. may have |
| 13 | been created with a previous run of <em>t.rast.neighbors</em>. |
| 14 | All maps will be processed using the current region settings unless the |
| 15 | <b>-r</b> flag is selected. In the latter case, the computaional region |
| 16 | is set to each raster map selected from the input STRDS. |
| 17 | |
| 18 | <p> |
| 19 | The user can select a subset of the input space time raster dataset for |
| 20 | processing using a SQL WHERE statement or using the <b>region_relation</b> |
| 21 | for spatial selection of raster maps. For the spatial map selection the |
| 22 | current computational region is used, even when the <b>-r</b> flag is |
| 23 | given. The number of CPU's to be used for parallel processing can be |
| 24 | specified with the <em>nprocs</em> option to speedup the computation on |
| 25 | multi-core system. |
| 26 | |
| 27 | <p> |
| 28 | Semantic labels are needed to relate output raster maps to input raster |
| 29 | maps. E.g. with <em>method=stddev</em>, the user needs to know the |
| 30 | spatial extent, the time stamp and the semantic label to determine |
| 31 | which stddev map corresponds to which input map. |
| 32 | |
| 33 | <h2>EXAMPLE</h2> |
| 34 | |
| 35 | To smooth the maps contained in a space time dataset run: |
| 36 | |
| 37 | <div class="code"><pre> |
| 38 | t.rast.neighbors input=tempmean_monthly output=smooth_tempmean_monthly \ |
| 39 | basename=tmean_smooth size=5 method=average nprocs=4 |
| 40 | |
| 41 | # show some info about the new space time dataset |
| 42 | t.info smooth_tempmean_monthly |
| 43 | +-------------------- Space Time Raster Dataset -----------------------------+ |
| 44 | | | |
| 45 | +-------------------- Basic information -------------------------------------+ |
| 46 | | Id: ........................ smooth_tempmean_monthly@climate_2000_2012 |
| 47 | | Name: ...................... smooth_tempmean_monthly |
| 48 | | Mapset: .................... climate_2000_2012 |
| 49 | | Creator: ................... lucadelu |
| 50 | | Temporal type: ............. absolute |
| 51 | | Creation time: ............. 2014-11-27 11:41:36.444579 |
| 52 | | Modification time:.......... 2014-11-27 11:41:39.978232 |
| 53 | | Semantic type:.............. mean |
| 54 | +-------------------- Absolute time -----------------------------------------+ |
| 55 | | Start time:................. 2009-01-01 00:00:00 |
| 56 | | End time:................... 2013-01-01 00:00:00 |
| 57 | | Granularity:................ 1 month |
| 58 | | Temporal type of maps:...... interval |
| 59 | +-------------------- Spatial extent ----------------------------------------+ |
| 60 | | North:...................... 320000.0 |
| 61 | | South:...................... 10000.0 |
| 62 | | East:.. .................... 935000.0 |
| 63 | | West:....................... 120000.0 |
| 64 | | Top:........................ 0.0 |
| 65 | | Bottom:..................... 0.0 |
| 66 | +-------------------- Metadata information ----------------------------------+ |
| 67 | | Raster register table:...... raster_map_register_ea1c9a83524e41a784d72744b08c6107 |
| 68 | | North-South resolution min:. 500.0 |
| 69 | | North-South resolution max:. 500.0 |
| 70 | | East-west resolution min:... 500.0 |
| 71 | | East-west resolution max:... 500.0 |
| 72 | | Minimum value min:.......... -6.428905 |
| 73 | | Minimum value max:.......... 18.867296 |
| 74 | | Maximum value min:.......... 4.247691 |
| 75 | | Maximum value max:.......... 28.767953 |
| 76 | | Aggregation type:........... None |
| 77 | | Number of registered maps:.. 48 |
| 78 | | |
| 79 | | Title: |
| 80 | | Monthly precipitation |
| 81 | | Description: |
| 82 | | Dataset with monthly precipitation |
| 83 | | Command history: |
| 84 | | # 2014-11-27 11:41:36 |
| 85 | | t.rast.neighbors input="tempmean_monthly" |
| 86 | | output="smooth_tempmean_monthly" basename="tmean_smooth" size="5" |
| 87 | | method="average" nprocs="4" |
| 88 | | |
| 89 | +----------------------------------------------------------------------------+ |
| 90 | |
| 91 | |
| 92 | # now compare the values between the original and the smoothed dataset |
| 93 | |
| 94 | t.rast.list input=smooth_tempmean_monthly columns=name,start_time,min,max |
| 95 | name|start_time|min|max |
| 96 | tmean_smooth_1|2009-01-01 00:00:00|-3.361714|7.409861 |
| 97 | tmean_smooth_2|2009-02-01 00:00:00|-1.820261|7.986794 |
| 98 | tmean_smooth_3|2009-03-01 00:00:00|2.912971|11.799684 |
| 99 | ... |
| 100 | tmean_smooth_46|2012-10-01 00:00:00|9.38767|18.709297 |
| 101 | tmean_smooth_47|2012-11-01 00:00:00|1.785653|10.911189 |
| 102 | tmean_smooth_48|2012-12-01 00:00:00|1.784212|11.983857 |
| 103 | |
| 104 | t.rast.list input=tempmean_monthly columns=name,start_time,min,max |
| 105 | name|start_time|min|max |
| 106 | 2009_01_tempmean|2009-01-01 00:00:00|-3.380823|7.426054 |
| 107 | 2009_02_tempmean|2009-02-01 00:00:00|-1.820261|8.006386 |
| 108 | 2009_03_tempmean|2009-03-01 00:00:00|2.656992|11.819274 |
| 109 | ... |
| 110 | 2012_10_tempmean|2012-10-01 00:00:00|9.070884|18.709297 |
| 111 | 2012_11_tempmean|2012-11-01 00:00:00|1.785653|10.911189 |
| 112 | 2012_12_tempmean|2012-12-01 00:00:00|1.761019|11.983857 |
| 113 | </pre></div> |
| 114 | |
| 115 | <h2>SEE ALSO</h2> |
| 116 | |
| 117 | <em> |
| 118 | <a href="r.neighbors.html">r.neighbors</a>, |
| 119 | <a href="t.rast.aggregate.ds.html">t.rast.aggregate.ds</a>, |
| 120 | <a href="t.rast.extract.html">t.rast.extract</a>, |
| 121 | <a href="t.info.html">t.info</a>, |
| 122 | <a href="g.region.html">g.region</a>, |
| 123 | <a href="r.mask.html">r.mask</a> |
| 124 | </em> |
| 125 | |
| 126 | <h2>AUTHOR</h2> |
| 127 | |
| 128 | Sören Gebbert, Thünen Institute of Climate-Smart Agriculture |