| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>t.shift</em> is designed to temporally shift all registered maps in |
| 4 |
a space time dataset with a user defined granularity. Raster, 3D raster |
| 5 |
and vector space time datasets are supported. |
| 6 |
<p> |
| 7 |
The format of the absolute time granularity is "number unit". Number is |
| 8 |
an integer, unit is the temporal unit that can be one of year(s), |
| 9 |
month(s), week(s), day(s), hour(s), minute(s) or second(s). |
| 10 |
<p> |
| 11 |
The granularity in case of relative time is an integer. The temporal |
| 12 |
unit is the unit of the space time dataset and can not be modified. |
| 13 |
|
| 14 |
<h2>NOTES</h2> |
| 15 |
|
| 16 |
Be careful when shifting space time datasets with absolute time. The |
| 17 |
temporal granularity may change if you shift a space time dataset with |
| 18 |
a unit that is different from the space time dataset granularity. Be |
| 19 |
aware that the shifting with months and years may result in incorrect |
| 20 |
days per month. Shifting the date 20012-03-31 with a granularity of one |
| 21 |
month will result in 2012-04-31 which is incorrect. In this case an |
| 22 |
error will raise and the shifting will not performed for the whole |
| 23 |
dataset. |
| 24 |
<p> |
| 25 |
You can use the extraction module to shift only a subset of maps from a |
| 26 |
space time dataset. Be aware that the shifting of maps affect all space |
| 27 |
time datasets in which they are registered. |
| 28 |
|
| 29 |
<h2>EXAMPLE</h2> |
| 30 |
|
| 31 |
We create 6 raster maps and register them in a space time raster |
| 32 |
dataset using an increment of one day. Then we shift the time intervals |
| 33 |
with a granularity of 12 hours. |
| 34 |
|
| 35 |
<div class="code"><pre> |
| 36 |
r.mapcalc expression="prec_1 = rand(0, 550)" |
| 37 |
r.mapcalc expression="prec_2 = rand(0, 450)" |
| 38 |
r.mapcalc expression="prec_3 = rand(0, 320)" |
| 39 |
r.mapcalc expression="prec_4 = rand(0, 510)" |
| 40 |
r.mapcalc expression="prec_5 = rand(0, 300)" |
| 41 |
r.mapcalc expression="prec_6 = rand(0, 650)" |
| 42 |
|
| 43 |
t.create type=strds temporaltype=absolute \ |
| 44 |
output=precipitation_daily \ |
| 45 |
title="Daily precipitation" \ |
| 46 |
description="Test dataset with daily precipitation" |
| 47 |
|
| 48 |
t.register -i type=raster input=precipitation_daily \ |
| 49 |
maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \ |
| 50 |
start=2012-01-01 increment="1 day" |
| 51 |
|
| 52 |
t.info type=strds input=precipitation_daily |
| 53 |
|
| 54 |
+-------------------- Space Time Raster Dataset -----------------------------+ |
| 55 |
| | |
| 56 |
+-------------------- Basic information -------------------------------------+ |
| 57 |
| Id: ........................ precipitation_daily@PERMANENT |
| 58 |
| Name: ...................... precipitation_daily |
| 59 |
| Mapset: .................... PERMANENT |
| 60 |
| Creator: ................... soeren |
| 61 |
| Temporal type: ............. absolute |
| 62 |
| Creation time: ............. 2014-11-23 19:20:26.004855 |
| 63 |
| Modification time:.......... 2014-11-23 19:20:26.471536 |
| 64 |
| Semantic type:.............. mean |
| 65 |
+-------------------- Absolute time -----------------------------------------+ |
| 66 |
| Start time:................. 2012-01-01 00:00:00 |
| 67 |
| End time:................... 2012-01-07 00:00:00 |
| 68 |
| Granularity:................ 1 day |
| 69 |
| Temporal type of maps:...... interval |
| 70 |
+-------------------- Spatial extent ----------------------------------------+ |
| 71 |
| North:...................... 80.0 |
| 72 |
| South:...................... 0.0 |
| 73 |
| East:.. .................... 120.0 |
| 74 |
| West:....................... 0.0 |
| 75 |
| Top:........................ 0.0 |
| 76 |
| Bottom:..................... 0.0 |
| 77 |
+-------------------- Metadata information ----------------------------------+ |
| 78 |
| Raster register table:...... raster_map_register_882043e9afaa4e60b845aceb1a1fee2c |
| 79 |
| North-South resolution min:. 10.0 |
| 80 |
| North-South resolution max:. 10.0 |
| 81 |
| East-west resolution min:... 10.0 |
| 82 |
| East-west resolution max:... 10.0 |
| 83 |
| Minimum value min:.......... 0.0 |
| 84 |
| Minimum value max:.......... 16.0 |
| 85 |
| Maximum value min:.......... 297.0 |
| 86 |
| Maximum value max:.......... 647.0 |
| 87 |
| Aggregation type:........... None |
| 88 |
| Number of registered maps:.. 6 |
| 89 |
| |
| 90 |
| Title: |
| 91 |
| Daily precipitation |
| 92 |
| Description: |
| 93 |
| Test dataset with daily precipitation |
| 94 |
| Command history: |
| 95 |
| # 2014-11-23 19:20:26 |
| 96 |
| t.create type="strds" temporaltype="absolute" |
| 97 |
| output="precipitation_daily" title="Daily precipitation" |
| 98 |
| description="Test dataset with daily precipitation" |
| 99 |
| # 2014-11-23 19:20:26 |
| 100 |
| t.register -i type="rast" input="precipitation_daily" |
| 101 |
| maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01" |
| 102 |
| increment="1 day" |
| 103 |
| |
| 104 |
+----------------------------------------------------------------------------+ |
| 105 |
|
| 106 |
t.rast.list input=precipitation_daily |
| 107 |
|
| 108 |
name|mapset|start_time|end_time |
| 109 |
prec_1|PERMANENT|2012-01-01 00:00:00|2012-01-02 00:00:00 |
| 110 |
prec_2|PERMANENT|2012-01-02 00:00:00|2012-01-03 00:00:00 |
| 111 |
prec_3|PERMANENT|2012-01-03 00:00:00|2012-01-04 00:00:00 |
| 112 |
prec_4|PERMANENT|2012-01-04 00:00:00|2012-01-05 00:00:00 |
| 113 |
prec_5|PERMANENT|2012-01-05 00:00:00|2012-01-06 00:00:00 |
| 114 |
prec_6|PERMANENT|2012-01-06 00:00:00|2012-01-07 00:00:00 |
| 115 |
|
| 116 |
|
| 117 |
t.shift type=strds input=precipitation_daily granularity="12 hours" |
| 118 |
|
| 119 |
t.info type=strds input=precipitation_daily |
| 120 |
|
| 121 |
+-------------------- Space Time Raster Dataset -----------------------------+ |
| 122 |
| | |
| 123 |
+-------------------- Basic information -------------------------------------+ |
| 124 |
| Id: ........................ precipitation_daily@PERMANENT |
| 125 |
| Name: ...................... precipitation_daily |
| 126 |
| Mapset: .................... PERMANENT |
| 127 |
| Creator: ................... soeren |
| 128 |
| Temporal type: ............. absolute |
| 129 |
| Creation time: ............. 2014-11-23 19:20:26.004855 |
| 130 |
| Modification time:.......... 2014-11-23 19:21:08.240018 |
| 131 |
| Semantic type:.............. mean |
| 132 |
+-------------------- Absolute time -----------------------------------------+ |
| 133 |
| Start time:................. 2012-01-01 12:00:00 |
| 134 |
| End time:................... 2012-01-07 12:00:00 |
| 135 |
| Granularity:................ 24 hours |
| 136 |
| Temporal type of maps:...... interval |
| 137 |
+-------------------- Spatial extent ----------------------------------------+ |
| 138 |
| North:...................... 80.0 |
| 139 |
| South:...................... 0.0 |
| 140 |
| East:.. .................... 120.0 |
| 141 |
| West:....................... 0.0 |
| 142 |
| Top:........................ 0.0 |
| 143 |
| Bottom:..................... 0.0 |
| 144 |
+-------------------- Metadata information ----------------------------------+ |
| 145 |
| Raster register table:...... raster_map_register_882043e9afaa4e60b845aceb1a1fee2c |
| 146 |
| North-South resolution min:. 10.0 |
| 147 |
| North-South resolution max:. 10.0 |
| 148 |
| East-west resolution min:... 10.0 |
| 149 |
| East-west resolution max:... 10.0 |
| 150 |
| Minimum value min:.......... 0.0 |
| 151 |
| Minimum value max:.......... 16.0 |
| 152 |
| Maximum value min:.......... 297.0 |
| 153 |
| Maximum value max:.......... 647.0 |
| 154 |
| Aggregation type:........... None |
| 155 |
| Number of registered maps:.. 6 |
| 156 |
| |
| 157 |
| Title: |
| 158 |
| Daily precipitation |
| 159 |
| Description: |
| 160 |
| Test dataset with daily precipitation |
| 161 |
| Command history: |
| 162 |
| # 2014-11-23 19:20:26 |
| 163 |
| t.create type="strds" temporaltype="absolute" |
| 164 |
| output="precipitation_daily" title="Daily precipitation" |
| 165 |
| description="Test dataset with daily precipitation" |
| 166 |
| # 2014-11-23 19:20:26 |
| 167 |
| t.register -i type="rast" input="precipitation_daily" |
| 168 |
| maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01" |
| 169 |
| increment="1 day" |
| 170 |
| # 2014-11-23 19:21:08 |
| 171 |
| t.shift type="strds" input="precipitation_daily" |
| 172 |
| granularity="12 hours" |
| 173 |
| |
| 174 |
+----------------------------------------------------------------------------+ |
| 175 |
|
| 176 |
|
| 177 |
t.rast.list input=precipitation_daily |
| 178 |
|
| 179 |
name|mapset|start_time|end_time |
| 180 |
prec_1|PERMANENT|2012-01-01 12:00:00|2012-01-02 12:00:00 |
| 181 |
prec_2|PERMANENT|2012-01-02 12:00:00|2012-01-03 12:00:00 |
| 182 |
prec_3|PERMANENT|2012-01-03 12:00:00|2012-01-04 12:00:00 |
| 183 |
prec_4|PERMANENT|2012-01-04 12:00:00|2012-01-05 12:00:00 |
| 184 |
prec_5|PERMANENT|2012-01-05 12:00:00|2012-01-06 12:00:00 |
| 185 |
prec_6|PERMANENT|2012-01-06 12:00:00|2012-01-07 12:00:00 |
| 186 |
</pre></div> |
| 187 |
|
| 188 |
<h2>SEE ALSO</h2> |
| 189 |
|
| 190 |
<em> |
| 191 |
<a href="t.create.html">t.create</a>, |
| 192 |
<a href="t.register.html">t.register</a>, |
| 193 |
<a href="t.snap.html">t.snap</a> |
| 194 |
</em> |
| 195 |
|
| 196 |
<h2>AUTHOR</h2> |
| 197 |
|
| 198 |
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture |