I’m looking for a way to extract the occurence (number of pixels of a certain class in a moving window) of a certain class in a moving window neighbourhood and write this to a map. r.neighbors only provides summarized versions of what I need. Is there a way to calculate this basic statistic without resorting to too much coding or exporting my maps into R or matlab?
Hello,
You can use r.mapcalc to perform any calculations based on cell
surrounding cell values/presence. See more information in r.mapcalc
help page [1] or take a look at r.lake [2] help page to see how cell
value is calculated based on neighborhood cell values with mapcalc.
I'm looking for a way to extract the occurence (number of pixels of a
certain class in a moving window) of a certain class in a moving window
neighbourhood and write this to a map. r.neighbors only provides summarized
versions of what I need. Is there a way to calculate this basic statistic
without resorting to too much coding or exporting my maps into R or matlab?