Learn R Programming

PrevMap (version 1.5.4)

continuous.sample: Spatially continuous sampling

Description

Draws a sample of spatial locations within a spatially continuous polygonal sampling region.

Usage

continuous.sample(poly, n, delta, k = 0, rho = NULL)

Arguments

poly

boundary of a polygon.

n

number of events.

delta

minimum permissible distance between any two events in preliminary sample.

k

number of locations in preliminary sample to be replaced by near neighbours of other preliminary sample locations in final sample (must be between 0 and n/2)

rho

maximum distance between close pairs of locations in final sample.

Value

A matrix of dimension n by 2 containing event locations.

Details

To draw a sample of size n from a spatially continuous region \(A\), with the property that the distance between any two sampled locations is at least delta, the following algorithm is used.

  • Step 1. Set \(i = 1\) and generate a point \(x_{1}\) uniformly distributed on \(A\).

  • Step 2. Increase \(i\) by 1, generate a point \(x_{i}\) uniformly distributed on \(A\) and calculate the minimum, \(d_{\min}\), of the distances from \(x_{i}\) to all \(x_{j}: j < i \).

  • Step 3. If \(d_{\min} \ge \delta\), increase \(i\) by 1 and return to step 2 if \(i \le n\), otherwise stop;

  • Step 4. If \(d_{\min} < \delta\), return to step 2 without increasing \(i\).

Sampling close pairs of points. For some purposes, it is desirable that a spatial sampling scheme include pairs of closely spaced points. In this case, the above algorithm requires the following additional steps to be taken. Let k be the required number of close pairs. Choose a value rho such that a close pair of points will be a pair of points separated by a distance of at most rho.

  • Step 5. Set \(j = 1\) and draw a random sample of size 2 from the integers \(1,2,\ldots,n\), say \((i_{1}; i_{2})\);

  • Step 6. Replace \(x_{i_{1}}\) by \(x_{i_{2}} + u\) , where \(u\) is uniformly distributed on the disc with centre \(x_{i_{2}}\) and radius rho, increase \(i\) by 1 and return to step 5 if \(i \le k\), otherwise stop.