~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to temporal/t.shift/t.shift.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

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