db.grid.sampling {RGeostats} | R Documentation |
Sampling a Grid along a segment
db.grid.sampling(dbgrid, x1, x2, cuts = 0, ndisc = 100)
dbgrid |
The |
x1 |
First end-point of the segment. The number of coordinates should match the dimension of 'dbgrid'. |
x2 |
Second end-point of the segment. The number of coordinates should match the dimension of 'dbgrid'. |
cuts |
Array of cutoff values. |
ndisc |
Number of discretization points generated along the segment. |
This function considers the segment [x1,x2], discretized into 'ndisc' intervals. At each endpoint of the discretized interval, the target variable (informed in the grid) is interpolated (using the multi-linear interpolation). Then each cutoff value is compared to this pair of interpolated values. If the cutoff lies between these two values, the coordinates of the intersection are returned.
A matrix with dimension:
Number of rows = Number of intersections of the segment with the set of cutoff values
Number of columns = Space dimension + 1
Each row gives the coordinates of an intersection of the initial segment with a cutoff value: its rank is given in the last column.