2

Can anyone help me out on the best package to sample from a spatial point dataset?

My dataset consists of a list of positions inside a region, and for each point I also have the name/number of the subregion where the point is located. I would like to make my sampling using only this dataset (for example I don't want to load a shape file with the subregions or a probability raster).

I have already made a "random" sampling for each subregion, however I am not taking into account the spatial distribution of the points inside each subregion.

I am looking for a package that would let me do both spatial random sampling as well as stratified random sampling, or some guidelines on how I can create my own code.

  • 1
    I will point out that if you utilize a model that creates a "spatial distribution" of points, they are no longer random. This is because for a point process to follow some sort of spatial distribution you are rejecting the Complete Spatial Randomness (CSR) assumption. If you are attempting to capture a spatial process then use a point process model or stratify otherwise, keep with a random sample. I do have some sampling functions available in the spatialEco package, including a stratified sample, that may be of use. – Jeffrey Evans Mar 30 '18 at 15:15
3

I'd suggest the spatstat package. Perhaps check out the quadratresample function. They also have several others to simulate random patterns that may fit your need (e.g. rstrat and rsyst). Random sampling should be pretty trivial to accomplish on your own (see the sample function in base R)

1

If you have access to ArcGIS 10x, the Geospatial Modelling Environment from Spatial Ecology does a fantastic job of integrating ArcGIS and R functions to create very useful workflows. The random sampling tools are the best I have come across. http://www.spatialecology.com/gme

0

With spsample from library(sp) it is easy to generate random points inside a polygon or spatial.

rpoints<-spsample(as_Spatial(shape),n=Numbre_point,"random")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.