#3067 closed defect (fixed)
r.mapcalc gives wrong result when neighborhood modifier takes a cell above first
Reported by: | wenzeslaus | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 7.0.5 |
Component: | Raster | Version: | svn-trunk |
Keywords: | r.mapcalc, neighborhood modifier | Cc: | |
CPU: | Unspecified | Platform: | Linux |
Description
When I run G7:r.mapcalc with x = p[1,0] + p[-1,0]
(r.mapcalc possibly first taking cell one row below), I get a correct result, but when I swap the parts if the expression to x = p[-1,0] + p[1,0]
(r.mapcalc possibly first taking cell one row above), I get a wrong result. A reproducible example follows.
> r.in.ascii in=- out=p <<EOF north: 10 south: 8 east: 20 west: 18 rows: 3 cols: 3 1 0 1 1 1 0 1 1 0 EOF > g.region rast=p > r.mapcalc "x1 = p[1,0] + p[-1,0]" && r.out.ascii x1 north: 10 south: 8 east: 20 west: 18 rows: 3 cols: 3 * * * 2 1 1 * * * > r.mapcalc "x2 = p[-1,0] + p[1,0]" && r.out.ascii x2 north: 10 south: 8 east: 20 west: 18 rows: 3 cols: 3 * * * 2 2 0 * * *
I get same result with or without r67851 (row cache fix for #2917).
Change History (10)
comment:1 by , 8 years ago
follow-up: 5 comment:4 by , 8 years ago
follow-up: 6 comment:5 by , 8 years ago
Replying to glynn:
Replying to wenzeslaus:
A reproducible example follows.
This should be fixed by r68717.
Shall I backport it?
comment:6 by , 8 years ago
comment:10 by , 8 years ago
Note:
See TracTickets
for help on using tickets.
In 68708: