1
# This is a simple timestamp check, creation and removal test
3
# We need to set a specific region in the
4
# @preprocess step of this test. We generate
5
# voxel data with r3.mapcalc.
6
# The region setting should work for UTM and LL test locations
7
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
9
# Lets gerenate a test map
10
r3.mapcalc --o expr="map3d = 1"
12
# The first @test uses several different absolute datum formats
13
r3.timestamp map=map3d date=none
14
r3.timestamp map=map3d
15
r3.timestamp map=map3d date="2003"
16
r3.timestamp map=map3d
17
r3.timestamp map=map3d date="Jul 2003"
18
r3.timestamp map=map3d
19
r3.timestamp map=map3d date="14 Jul 2003"
20
r3.timestamp map=map3d
21
r3.timestamp map=map3d date="14 Jul 2003 10"
22
r3.timestamp map=map3d
23
r3.timestamp map=map3d date="14 Jul 2003 10:30 +0700"
24
r3.timestamp map=map3d
25
r3.timestamp map=map3d date="14 Jul 2003 10:30:25"
26
r3.timestamp map=map3d
27
r3.timestamp map=map3d date="14 Jul 2003 10:30:25 +0700 / 15 Jul 2003 11:35:12 +0700"
28
r3.timestamp map=map3d
29
r3.timestamp map=map3d date="14 Jul 2003 10:30:25 +0700 / 15 Jul 2003"
30
r3.timestamp map=map3d
31
r3.timestamp map=map3d date=none
32
r3.timestamp map=map3d
34
# The second @test uses several different relative datum formats
35
r3.timestamp map=map3d date=none
36
r3.timestamp map=map3d
37
r3.timestamp map=map3d date="2 years"
38
r3.timestamp map=map3d
39
r3.timestamp map=map3d date="2 years 3 months"
40
r3.timestamp map=map3d
41
r3.timestamp map=map3d date="5 days"
42
r3.timestamp map=map3d
43
r3.timestamp map=map3d date="3 hours"
44
r3.timestamp map=map3d
45
r3.timestamp map=map3d date="5 minutes 30 seconds"
46
r3.timestamp map=map3d
47
r3.timestamp map=map3d date="2 years 2 months / 5 years 8 months"
48
r3.timestamp map=map3d
49
r3.timestamp map=map3d date=none
51
# The third @test to check @failure with wrong time stamps
52
g.message message="Now checking for expected failures due to wrong time stamps..."
53
r3.timestamp map=map3d date="2 years 3 months 8 days"
54
r3.timestamp map=map3d date="1 month 5 days"
55
r3.timestamp map=map3d date="July 2003"
56
r3.timestamp map=map3d date="14 Jul 2003 +0700"