MAPI_EstimateHalfwidth: Function MAPI_EstimateHalfwidth
Description
This function computes the side length (= halfwidth) of the hexagonal cells. Halfwidth value can be further used to build a MAPI grid.
Usage
MAPI_EstimateHalfwidth(samples, crs, beta = 0.25)
Arguments
samples
a data.frame with names and geographical coordinates of samples. Column names must be: 'ind', 'x', 'y'.
Optional column 'errRad' with an error radius for sample locations (eg. GPS uncertainty).
Coordinates must be projected (not latitude/longitude).
crs
coordinate reference system: integer with the EPSG code, or character with proj4string.
The coordinates system must be a projection, not latitude/longitude.
beta
A value depending on spatial regularity of sampling: 0.5 for regular sampling, 0.25 for random sampling (Hengl, 2006).
Value
halfwidth cell value (side length of hexagonal cells).
Details
\(h_w = \frac{\beta \sqrt{A/N}}{\sqrt{2.5980}}\), where A is the study area (convex hull of sampling points) and N the number of samples.
Parameter beta allows to respect the Nyquist-Shannon sampling theorem depending on sampling regularity.
References
Hengl, T. (2006) Finding the right pixel size. Computers & Geosciences, 32, 1283--1298.
# NOT RUN {data(samples)
# Computes hexagonal cell halfwidth for the 'samples' dataset using beta=0.5hw <- MAPI_EstimateHalfwidth(samples, beta=0.5)
# }