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

« back to all changes in this revision

Viewing changes to temporal/t.register/test.t.register.raster.timestamp.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
# 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
 
5
# datasets.
 
6
 
 
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
 
10
# with absolute time
 
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
 
13
 
 
14
# Generate data
 
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
 
19
 
 
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"
 
24
 
 
25
# The first @test
 
26
# We create the space time raster inputs and register the raster maps with absolute time interval
 
27
 
 
28
t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
 
29
 
 
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
 
33
r.info map=prec_1
 
34
t.rast.list input=precip_abs1
 
35
t.topology input=precip_abs1
 
36
 
 
37
# Test the warning message
 
38
t.remove -rf type=strds input=precip_abs1