[GRASS-user] r.neighbor circular mask VS r.buffer on single pixel

Dear list,

I am working on 50m resolution DEM making analysis on 1 km radius
area, in order to find local minimum.
To begin, I used r.neighbor with a circular mask , size 41 pixel.
I repeated a similar analysis (adding another filter) parsing r.univar
on each 1km buffer around each pixel (using r.mask)

Just for the sake of precision, I also tested my routine not
considering the added filter and I notice a few cases where the two
results slightly differ, probably due a difference between r.neighbor
circular mask and r.buffer output used as mask: as you can see in the
attached image, the blue pixel is the minimum using buffer, the red
one using r.neighbor

Does it make sense? or the two analysis should return the same result
as the two masks should have the same shape?

Enrico

(attachments)

buffer.png

2012/9/6 Enrico Gallo <enrico.gallo@gmail.com>:

To begin, I used r.neighbor with a circular mask , size 41 pixel.
I repeated a similar analysis (adding another filter) parsing r.univar
on each 1km buffer around each pixel (using r.mask)

Just for the sake of precision, I also tested my routine not
considering the added filter and I notice a few cases where the two
results slightly differ, probably due a difference between r.neighbor
circular mask and r.buffer output used as mask

Solved

The problem was not in r.neighbor nor in r.buffer, but in a
preprocessing step I made (and I omitted in the previous message).
In the first case (r.neighbor) I limited computation only on pixels of
the channel network extracted by r.stream.extract
In the second one (r.buffer + r.mask) for each pixel I used downstream
channel network extracted by r.drain (on the same accumulation map
used as input of r.stream.extract, but inverted)

The two networks "slightly differ" , and local statistics too.
Aligning the two network, all was fine.

Enrico