3
<em>t.snap</em> is designed to convert time instances of maps into time
4
intervals or to create valid temporal topologies for space time
5
datasets. Raster, 3D raster and vector space time datasets are
6
supported with absolute and relative time.
8
This module "snaps" the end time of each registered map of a space time
9
dataset to the start time of the map that is the temporal nearest
10
neighbour in the future. Maps with equal time stamps are not modified
11
and must be removed or modified to create a valid temporal topology. In
12
case the last map in the space time dataset is a time instance, the
13
granularity of the space time dataset will be used to create the time
18
A raster space time dataset will be create using precipitation maps for 2012
19
then using absolute time in a space time raster dataset using an increment
21
At the end we snap the created time instances resulting in time intervals.
23
<div class="code"><pre>
26
t.create type=strds temporaltype=absolute \
27
output=precipitation_monthly \
28
title="Monthly precipitation" \
29
description="Dataset with monthly precipitation"
31
t.register type=raster input=precipitation_monthly \
32
maps=`g.list type=raster patt=2012*precip sep=,` \
33
start=2012-01-01 increment="1 months"
35
# please take attention to "Temporal type of maps" value
36
t.info type=strds input=precipitation_monthly
38
+-------------------- Space Time Raster Dataset -----------------------------+
40
+-------------------- Basic information -------------------------------------+
41
| Id: ........................ precipitation_monthly@climate_2009_2012
42
| Name: ...................... precipitation_monthly
43
| Mapset: .................... climate_2009_2012
44
| Creator: ................... lucadelu
45
| Temporal type: ............. absolute
46
| Creation time: ............. 2014-11-28 15:52:30.801148
47
| Modification time:.......... 2014-11-28 15:53:18.430773
48
| Semantic type:.............. mean
49
+-------------------- Absolute time -----------------------------------------+
50
| Start time:................. 2012-01-01 00:00:00
51
| End time:................... 2012-12-01 00:00:00
52
| Granularity:................ 1 month
53
| Temporal type of maps:...... point
54
+-------------------- Spatial extent ----------------------------------------+
55
| North:...................... 320000.0
56
| South:...................... 10000.0
57
| East:.. .................... 935000.0
58
| West:....................... 120000.0
59
| Top:........................ 0.0
60
| Bottom:..................... 0.0
61
+-------------------- Metadata information ----------------------------------+
62
| Raster register table:...... raster_map_register_282454f66ff5455299526ec3c1db7362
63
| North-South resolution min:. 500.0
64
| North-South resolution max:. 500.0
65
| East-west resolution min:... 500.0
66
| East-west resolution max:... 500.0
67
| Minimum value min:.......... 0.0
68
| Minimum value max:.......... 95.58169
69
| Maximum value min:.......... 132.413284
70
| Maximum value max:.......... 356.502949
71
| Aggregation type:........... None
72
| Number of registered maps:.. 12
75
| Monthly precipitation
77
| Dataset with monthly precipitation
79
| # 2014-11-28 15:52:30
80
| t.create type="strds" temporaltype="absolute"
81
| output="precipitation_monthly" title="Monthly precipitation"
82
| description="Dataset with monthly precipitation"
83
| # 2014-11-28 15:53:18
84
| t.register type="rast" input="precipitation_monthly"
85
| maps="2012_01_precip,2012_02_precip, ... ,2012_11_precip,2012_12_precip"
86
| start="2012-01-01" increment="1 months"
88
+----------------------------------------------------------------------------+
91
# you can see that end time is not set
92
t.rast.list input=precipitation_monthly
94
name|mapset|start_time|end_time
95
2012_01_precip|climate_2009_2012|2012-01-01 00:00:00|None
96
2012_02_precip|climate_2009_2012|2012-02-01 00:00:00|None
97
2012_03_precip|climate_2009_2012|2012-03-01 00:00:00|None
98
2012_04_precip|climate_2009_2012|2012-04-01 00:00:00|None
99
2012_05_precip|climate_2009_2012|2012-05-01 00:00:00|None
100
2012_06_precip|climate_2009_2012|2012-06-01 00:00:00|None
101
2012_07_precip|climate_2009_2012|2012-07-01 00:00:00|None
102
2012_08_precip|climate_2009_2012|2012-08-01 00:00:00|None
103
2012_09_precip|climate_2009_2012|2012-09-01 00:00:00|None
104
2012_10_precip|climate_2009_2012|2012-10-01 00:00:00|None
105
2012_11_precip|climate_2009_2012|2012-11-01 00:00:00|None
106
2012_12_precip|climate_2009_2012|2012-12-01 00:00:00|None
110
t.snap type=strds input=precipitation_monthly
112
# please take attention to "Temporal type of maps" value again
113
t.info type=strds input=precipitation_monthly
115
+-------------------- Space Time Raster Dataset -----------------------------+
117
+-------------------- Basic information -------------------------------------+
118
| Id: ........................ precipitation_monthly@climate_2009_2012
119
| Name: ...................... precipitation_monthly
120
| Mapset: .................... climate_2009_2012
121
| Creator: ................... lucadelu
122
| Temporal type: ............. absolute
123
| Creation time: ............. 2014-11-28 15:52:30.801148
124
| Modification time:.......... 2014-11-28 15:54:28.739905
125
| Semantic type:.............. mean
126
+-------------------- Absolute time -----------------------------------------+
127
| Start time:................. 2012-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_282454f66ff5455299526ec3c1db7362
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:.......... 0.0
145
| Minimum value max:.......... 95.58169
146
| Maximum value min:.......... 132.413284
147
| Maximum value max:.......... 356.502949
148
| Aggregation type:........... None
149
| Number of registered maps:.. 12
152
| Monthly precipitation
154
| Dataset with monthly precipitation
156
| # 2014-11-28 15:52:30
157
| t.create type="strds" temporaltype="absolute"
158
| output="precipitation_monthly" title="Monthly precipitation"
159
| description="Dataset with monthly precipitation"
160
| # 2014-11-28 15:53:18
161
| t.register type="rast" input="precipitation_monthly"
162
| maps="2012_01_precip,2012_02_precip, ... ,2012_11_precip,2012_12_precip"
163
| start="2012-01-01" increment="1 months"
164
| # 2014-11-28 15:54:28
165
| t.snap type="strds" input="precipitation_monthly"
167
+----------------------------------------------------------------------------+
170
# now instead end time is set
172
t.rast.list input=precipitation_daily
174
2012_01_precip|climate_2009_2012|2012-01-01 00:00:00|2012-02-01 00:00:00
175
2012_02_precip|climate_2009_2012|2012-02-01 00:00:00|2012-03-01 00:00:00
176
2012_03_precip|climate_2009_2012|2012-03-01 00:00:00|2012-04-01 00:00:00
177
2012_04_precip|climate_2009_2012|2012-04-01 00:00:00|2012-05-01 00:00:00
178
2012_05_precip|climate_2009_2012|2012-05-01 00:00:00|2012-06-01 00:00:00
179
2012_06_precip|climate_2009_2012|2012-06-01 00:00:00|2012-07-01 00:00:00
180
2012_07_precip|climate_2009_2012|2012-07-01 00:00:00|2012-08-01 00:00:00
181
2012_08_precip|climate_2009_2012|2012-08-01 00:00:00|2012-09-01 00:00:00
182
2012_09_precip|climate_2009_2012|2012-09-01 00:00:00|2012-10-01 00:00:00
183
2012_10_precip|climate_2009_2012|2012-10-01 00:00:00|2012-11-01 00:00:00
184
2012_11_precip|climate_2009_2012|2012-11-01 00:00:00|2012-12-01 00:00:00
185
2012_12_precip|climate_2009_2012|2012-12-01 00:00:00|2013-01-01 00:00:00
191
<a href="t.shift.html">t.shift</a>,
192
<a href="t.create.html">t.create</a>,
193
<a href="t.register.html">t.register</a>
198
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
200
<p><i>Last changed: $Date: 2014-12-27 00:50:11 +0100 (Sat, 27 Dec 2014) $</i>