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

« back to all changes in this revision

Viewing changes to temporal/t.vect.import/testsuite/test.t.vect.import.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
# Test the import of space time vector 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
mkdir test
 
10
 
 
11
v.random --o -z output=soil_1 n=100 zmin=0 zmax=100 column=height seed=1
 
12
v.random --o -z output=soil_2 n=100 zmin=0 zmax=100 column=height seed=2
 
13
v.random --o -z output=soil_3 n=100 zmin=0 zmax=100 column=height seed=3
 
14
 
 
15
n1=`g.tempfile pid=1 -d` 
 
16
 
 
17
cat > "${n1}" << EOF
 
18
soil_1
 
19
soil_2
 
20
soil_3
 
21
EOF
 
22
 
 
23
t.create --o type=stvds temporaltype=absolute output=soil_abs1 title="A test" descr="A test"
 
24
t.register -i type=vector input=soil_abs1 file="${n1}" start='2001-01-01' increment="1 months"
 
25
 
 
26
# The first @test
 
27
t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar.bz2 compression=bzip2 directory=/tmp
 
28
t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar.gz compression=gzip directory=/tmp
 
29
t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar compression=no directory=/tmp
 
30
 
 
31
t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar.bz2 compression=bzip2 directory=/tmp
 
32
t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar.gz compression=gzip directory=/tmp
 
33
t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar compression=no directory=/tmp
 
34
 
 
35
# Checking different flags
 
36
t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 directory=test\
 
37
          -oe title="A test" description="Description of a test"
 
38
t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 directory=test\
 
39
          -o title="A test" description="Description of a test"
 
40
t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 directory=test\
 
41
              title="A test" description="Description of a test"
 
42
 
 
43
# Import using different compression and formats
 
44
t.vect.import --o input=stvds_export_gml.tar.gz output=soil_abs2 directory=test\
 
45
              title="A test" description="Description of a test"
 
46
v.info soil_1
 
47
t.vect.import --o input=stvds_export_gml.tar output=soil_abs2 directory=test\
 
48
              title="A test" description="Description of a test"
 
49
v.info soil_1
 
50
t.vect.import --o input=stvds_export_pack.tar output=soil_abs2 directory=test\
 
51
              title="A test" description="Description of a test"
 
52
v.info soil_1
 
53
t.vect.import --o input=stvds_export_pack.tar.gz output=soil_abs2 directory=test\
 
54
              title="A test" description="Description of a test"
 
55
v.info soil_1
 
56
t.vect.import --o input=stvds_export_pack.tar.bz2 output=soil_abs2 directory=test\
 
57
              title="A test" description="Description of a test"
 
58
v.info soil_1
 
59
 
 
60
# Cleaning up
 
61
rm -rf test
 
62
g.remove -f type=vector name=soil_1,soil_2,soil_3
 
63
t.unregister type=vector file="${n1}"
 
64
t.remove type=stvds input=soil_abs1,soil_abs2
 
65
rm stvds_export_gml.tar.bz2
 
66
rm stvds_export_gml.tar.gz
 
67
rm stvds_export_gml.tar
 
68
rm stvds_export_pack.tar.bz2
 
69
rm stvds_export_pack.tar.gz
 
70
rm stvds_export_pack.tar
 
71