You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using r.neighbors in GRASS GIS 8.4 (Debian 12), the module does not respect the active mask. Despite applying a mask, r.neighbors computes values for masked areas.
Documentation for r.neighbors:
"Ther.neighbors program works in the current geographic region with the current mask, if any."
Reproduce with any raster like this. Tested for mode and average methods.
My understanding is that the behavior you see is from the current design of how the MASK works in general. It is used/applied only when reading data, not on write. So the masked pixels that have any valid data within the moving window receive values when the result is written. As of now, you would have to remove those pixels in a second step if that is the result you want. I think there was a feature request for MASK on write, but I cannot find it right now...
@ninsbl
Thank you for this feedback.
I understand that, but does this mean that the documentation should be improved?
"Ther.neighbors program works in the current geographic region with the current mask, if any."
The meaning of "with the current mask" can be ambiguous. I understand it as it writes. If there would me no mask mentioned it wouldn't raise no doubts, cause the mask, as you stated, is used to read.
When using
r.neighbors
in GRASS GIS 8.4 (Debian 12), the module does not respect the active mask. Despite applying a mask,r.neighbors
computes values for masked areas.Documentation for
r.neighbors
:"The
r.neighbors
program works in the current geographic region with the current mask, if any."Reproduce with any raster like this. Tested for mode and average methods.
Screenshot of the masked area. The operation was performed after masking.
Screenshot of the result with the removed masked
The text was updated successfully, but these errors were encountered: