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

« back to all changes in this revision

Viewing changes to temporal/t.rename/test.t.rename.sh

  • 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
#!/bin/sh
 
2
# Tests the rename module of space time datasets 
 
3
 
 
4
# We need to set a specific region in the
 
5
# @preprocess step of this test. 
 
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
 
8
 
 
9
# Generate data
 
10
r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
 
11
r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
 
12
 
 
13
# We need to create three space time dataset
 
14
t.create --v --o type=strds temporaltype=absolute output=precip_abs1 \
 
15
        title="Test" descr="This is the 1 test strds" semantictype=sum
 
16
t.register -i --o input=precip_abs1 maps=prec_1,prec_2 \
 
17
        start="2001-01-01" increment="1 seconds"
 
18
 
 
19
t.create --v --o type=strds temporaltype=absolute output=precip_abs2 \
 
20
        title="Test" descr="This is the 2 test strds" semantictype=sum
 
21
t.register --o input=precip_abs2 maps=prec_1,prec_2
 
22
 
 
23
t.create --v --o type=strds temporaltype=absolute output=precip_abs3 \
 
24
        title="Test" descr="This is the 3 test strds" semantictype=sum
 
25
t.register --o input=precip_abs3 maps=prec_1,prec_2
 
26
 
 
27
 
 
28
t.info precip_abs1
 
29
t.info precip_abs2
 
30
t.info precip_abs3
 
31
 
 
32
# @test Rename the space time raster dataset by overwritung an old one
 
33
t.rename --o type=strds input=precip_abs1 output=precip_abs2
 
34
t.info precip_abs2
 
35
 
 
36
t.info type=raster input=prec_1
 
37
t.info type=raster input=prec_2
 
38
 
 
39
t.rename --o type=strds input=precip_abs2 output=precip_abs4
 
40
t.info precip_abs4
 
41
 
 
42
t.info type=raster input=prec_1
 
43
t.info type=raster input=prec_2
 
44
 
 
45
# Error checking, new dataset has the wrong mapset
 
46
t.rename type=strds input=precip_abs4 output=precip_abs3@BLABLA
 
47
# Error checking, no overwrite flag set
 
48
t.rename type=strds input=precip_abs4 output=precip_abs3
 
49
 
 
50
t.remove --v type=strds input=precip_abs3,precip_abs4
 
51
t.unregister type=raster maps=prec_1,prec_2
 
52
g.remove -f type=raster name=prec_1,prec_2