~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to raster3d/r3.stats/test.r3.stats.sh

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Tests for r3.stats
 
2
 
 
3
# We set up a specific region in the
 
4
# @preprocess step of this test. We generate
 
5
# voxel data with r3.mapcalc. The region setting 
 
6
# 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
# We create several (float, double, null value) voxel map
 
9
# with value = col + row + depth. 
 
10
r3.mapcalc --o expr="volume_float = float(col() + row() + depth())"
 
11
r3.mapcalc --o expr="volume_double = double(col() + row() + depth())"
 
12
# Add null value information to test correct null value handling
 
13
r3.mapcalc --o expr="volume_float_null = if(row() == 1 || row() == 5, null(), volume_float)"
 
14
r3.mapcalc --o expr="volume_double_null = if(row() == 2 || row() == 6, null(), volume_double)"
 
15
 
 
16
# @test r3.stats with float maps and @file validation. 
 
17
# The module output on stdout is piped into text files
 
18
r3.stats input=volume_float_null nsteps=1 > test_volume_float_stats_1.txt
 
19
r3.stats input=volume_float_null nsteps=2  > test_volume_float_stats_2.txt
 
20
r3.stats input=volume_float_null nsteps=7  > test_volume_float_stats_7.txt
 
21
r3.stats input=volume_float_null nsteps=14 > test_volume_float_stats_14.txt
 
22
r3.stats input=volume_float_null nsteps=21 > test_volume_float_stats_21.txt
 
23
r3.stats -e input=volume_float_null > test_volume_float_stats_e.txt
 
24
# Test double maps
 
25
r3.stats input=volume_double_null nsteps=1  > test_volume_double_stats_1.txt
 
26
r3.stats input=volume_double_null nsteps=3  > test_volume_double_stats_3.txt
 
27
r3.stats input=volume_double_null nsteps=9  > test_volume_double_stats_9.txt
 
28
r3.stats input=volume_double_null nsteps=18 > test_volume_double_stats_18.txt
 
29
r3.stats input=volume_double_null nsteps=22 > test_volume_double_stats_22.txt
 
30
r3.stats -e input=volume_double_null > test_volume_double_stats_e.txt
 
31
 
 
32
# Comparison of references and text files
 
33
for i in `ls *.ref` ; do 
 
34
    diff $i "`basename $i .ref`.txt" ; 
 
35
done
 
36
rm *.txt