2
# This is a test to register and unregister raster maps in
3
# space time raster datasets.
4
# The raster maps will be registered in different space time raster
7
# We need to set a specific region in the
8
# @preprocess step of this test. We generate
9
# raster with r.mapcalc and create several space time raster datasets
11
# The region setting should work for UTM and LL test locations
12
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
15
r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
16
r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
17
r.mapcalc --o expr="prec_3 = rand(0, 320)" -s
18
r.mapcalc --o expr="prec_4 = rand(0, 510)" -s
20
r.timestamp map=prec_1 date="1 jan 1995 / 23 sep 1995"
21
r.timestamp map=prec_2 date="14 jul 1996 / 15 jul 1996"
22
r.timestamp map=prec_3 date="1 mar 1998"
23
r.timestamp map=prec_4 date="17 mar 1950 / 28 apr 1960"
26
# We create the space time raster inputs and register the raster maps with absolute time interval
28
t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
30
t.register --o -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4
31
t.info type=strds input=precip_abs1
32
t.info -g type=strds input=precip_abs1
34
t.rast.list input=precip_abs1
35
t.topology input=precip_abs1
37
# Test the warning message
38
t.remove -rf type=strds input=precip_abs1