3
export GRASS_OVERWRITE=1
5
g.region w=0 e=30 s=0 n=30 b=0 t=30 res3=10
7
r3.mapcalc expr="test_neighbor_float = float(3)"
8
r3.mapcalc expr="test_neighbor_double = double(3)"
9
r3.mapcalc expr="test_neighbor_null = null()"
11
# First @test with float values with @precision=2
12
r3.neighbors input=test_neighbor_float output=test_neighbor_float_average \
13
method=average window=3,3,3
14
r3.out.ascii precision=2 input=test_neighbor_float_average output=test_neighbor_float_average.txt
16
r3.neighbors input=test_neighbor_float output=test_neighbor_float_sum \
17
method=sum window=3,3,3
18
r3.out.ascii precision=2 input=test_neighbor_float_sum output=test_neighbor_float_sum.txt
20
# Second @test with double values
21
r3.neighbors input=test_neighbor_double output=test_neighbor_double_average \
22
method=average window=3,3,3
23
r3.out.ascii precision=2 input=test_neighbor_double_average output=test_neighbor_double_average.txt
25
r3.neighbors input=test_neighbor_double output=test_neighbor_double_sum \
26
method=sum window=3,3,3
27
r3.out.ascii precision=2 input=test_neighbor_double_sum output=test_neighbor_double_sum.txt
29
# Third @test with null values
31
r3.neighbors input=test_neighbor_null output=test_neighbor_null_sum \
32
method=sum window=3,3,3
33
r3.out.ascii precision=2 input=test_neighbor_null_sum output=test_neighbor_null_sum.txt