Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#3067 closed defect (fixed)

r.mapcalc gives wrong result when neighborhood modifier takes a cell above first

Reported by: wenzeslaus Owned by: grass-dev@…
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.

Error: Failed to load processor bash
No macro or processor named 'bash' found

I get same result with or without r67851 (row cache fix for #2917).

Change History (10)

comment:1 Changed 3 years ago by wenzeslaus

In 68708:

r.mapcalc: test for row order reading problem (see #3067)

comment:2 Changed 3 years ago by marisn

I can confirm the issue with trunk r68709

comment:3 Changed 3 years ago by glynn

Resolution: fixed
Status: newclosed

In 68717:

Fix #3067

comment:4 in reply to:  description ; Changed 3 years ago by glynn

Replying to wenzeslaus:

A reproducible example follows.

This should be fixed by r68717.

comment:5 in reply to:  4 ; Changed 3 years ago by neteler

Replying to glynn:

Replying to wenzeslaus:

A reproducible example follows.

This should be fixed by r68717.

Shall I backport it?

comment:6 in reply to:  5 Changed 3 years ago by glynn

Replying to neteler:

Shall I backport it?

I think so. The previous version was clearly incorrect.

comment:7 Changed 3 years ago by wenzeslaus

In 68722:

r.forestfrag: fix test reference data after r68717 (see #3067)

comment:8 Changed 3 years ago by neteler

In 68768:

r.mapcalc: fix wrong result when neighborhood modifier takes a cell above first (trunk, r68717, fixes #3067)

comment:9 Changed 3 years ago by neteler

In 68769:

r.mapcalc: fix wrong result when neighborhood modifier takes a cell above first (trunk, r68717, fixes #3067)

comment:10 Changed 3 years ago by neteler

Backported in r68768 (relbr72), r68769 (relbr70).

Note that relbr64 seems not to be affected since the cache was introduced only in r34444 and not backported.

Note: See TracTickets for help on using tickets.