[GRASS-user] Probabilistic neighborhood analysis

Bernardo Santos bernardo_brandaum at yahoo.com.br
Mon Jan 9 02:55:08 PST 2023


 Hi Vero,
Thanks for the suggestion.I tried it, but it only gives different weights to the values within the neighborhood according to a distance decay function. However, the values are still determined "deterministically".
What I could do is to use the function terra::focal() in R, since within it I can define a function to be computed for the neighborhood and use sample() to make this operation probabilistic. It seems to work, but it quite time consuming though.
BestBernardo
    Em segunda-feira, 26 de dezembro de 2022 16:13:02 GMT+1, Veronica Andreo <veroandreo at gmail.com> escreveu:  
 
 Hello Bernardo, 

I haven't tested myself, but have you tried r.neighbors with the different weight-related options?
Vero

El mié, 14 dic 2022 a las 10:38, Bernardo Santos via grass-user (<grass-user at lists.osgeo.org>) escribió:

Hi,
I am trying to produce scenarios of past land cover, before hydropower reservoirs were built. To do so, I need to fill empty pixels from a raster in the locations where the reservoirs are currently present, using as input the actual land cover map. I tried doing that with r.neighbors (taking method=mode) with neighborhoods of increasing size, to replace null pixels with the most common land cover class in the neighborhood. I also tried that with r.fill.stats which is basically the same thing.However, the results gets very homogeneous, since the interpolated null cells always get the value of the most common land cover class.
Do anyway know of a method in GRASS to perform a "probabilistic" neirighborhood analysis, where cells in a neighborhood are given weights (possibly related to the distance to the central cell and to their frequency) and these weights are used to stocastically sample a value to fill the central cell?If not in GRASS, does anyway know of such a method in a different platform, i.e. R?
Thanks!BestBernardo_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20230109/c3e3810b/attachment.htm>


More information about the grass-user mailing list