Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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