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

« back to all changes in this revision

Viewing changes to scripts/v.unpack/test_suite/test.v.unpack.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
# This script tests v.pack and v.unpack
 
2
 
 
3
# We specific a small region in the
 
4
# @preprocess step
 
5
# The region setting should work for UTM and LL test locations
 
6
g.region s=0 n=70 w=0 e=100 b=0 t=50 -p
 
7
 
 
8
# We need different vector maps, with and without tables 
 
9
# and with multiple layers
 
10
v.random --o -z output=probe_1 n=100 zmin=0 zmax=100 seed=1
 
11
v.random --o -z output=probe_2 n=100 zmin=0 zmax=100 column=height seed=1
 
12
v.random --o -z output=probe_orig n=100 zmin=0 zmax=100 column=height seed=1
 
13
# Adding new layer with categories
 
14
v.category input=probe_orig out=probe_3 option=transfer layer=1,2,3 --o
 
15
 
 
16
# Creating new tables for each layer
 
17
db.copy from_table=probe_orig to_table=probe_3_1
 
18
db.copy from_table=probe_orig to_table=probe_3_2
 
19
db.copy from_table=probe_orig to_table=probe_3_3
 
20
 
 
21
# Removing un-needed vectors and tables
 
22
g.remove -f type=vector name=probe_orig
 
23
v.db.droptable -f map=probe_3 table=probe_3 layer=1
 
24
 
 
25
# Adding tables to layer
 
26
v.db.addtable --o map=probe_3 table=probe_3_1 layer=1 
 
27
v.db.addtable --o map=probe_3 table=probe_3_2 layer=2 
 
28
v.db.addtable --o map=probe_3 table=probe_3_3 layer=3 
 
29
 
 
30
# First we @test the packing/export with v.pack
 
31
v.pack --o input=probe_1
 
32
v.pack --o input=probe_2
 
33
v.pack --o input=probe_3
 
34
 
 
35
v.pack --o -c input=probe_1 output=probe_1_uncompressed.pack
 
36
v.pack --o -c input=probe_2 output=probe_2_uncompressed.pack
 
37
v.pack --o -c input=probe_3 output=probe_3_uncompressed.pack
 
38
 
 
39
# We need to clean before import
 
40
g.remove -f type=vector name=probe_1,probe_2,probe_3
 
41
 
 
42
# Test the compressed import with v.unpack
 
43
v.unpack --o input=probe_1.pack
 
44
v.category input=probe_1 option=report
 
45
v.unpack --o input=probe_2.pack
 
46
v.category input=probe_2 option=report
 
47
v.unpack --o input=probe_3.pack
 
48
v.category input=probe_3 option=report
 
49
 
 
50
# Test the uncompressed import with v.unpack (Seems to fail?)
 
51
v.unpack --o input=probe_1_uncompressed.pack output=probe_1_uncompressed
 
52
v.category input=probe_1_uncompressed option=report
 
53
v.unpack --o input=probe_2_uncompressed.pack output=probe_2_uncompressed
 
54
v.category input=probe_2_uncompressed option=report
 
55
v.unpack --o input=probe_3_uncompressed.pack output=probe_3_uncompressed
 
56
v.category input=probe_3_uncompressed option=report
 
57
 
 
58
g.remove -f type=vector name=probe_1_uncompressed,probe_2_uncompressed,probe_3_uncompressed
 
59
#rm *.pack