Is there a package for plotting random points with a specific condition from a raster?

31 Views Asked by At

I have a few raster files, on which I should plot some random points for pseudoabsence. The condition, or buffer would be 2 random points in every 4x4 pixel area.

I found the dismo package, which contains a randomPoints function, which would be perfect if I somehow could implement the buffer mentioned.

Also if there is no package which could do what I am in need of, is there a way to write a function on my own, using the xcell, ycell properties of the raster?

dimensions : 55, 35, 1925 (nrow, ncol, ncell)

resolution : 30, 30 (x, y)

extent : 250455, 251505, 5125215, 5126865 (xmin, xmax, ymin, ymax)

Here are the properties of the mentioned raster just in case.

Thank you guys!

0

There are 0 best solutions below