Description Usage Arguments Details Value References Examples
View source: R/MAPI_EstimateHalfwidth.R
This function computes the side length (= halfwidth) of the hexagonal cells. Halfwidth value can be further used to build a MAPI grid.
1 | MAPI_EstimateHalfwidth(samples, crs, beta = 0.25)
|
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). |
hw = p / sqrt(2.5980) with p = beta * sqrt(A/N), 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.
halfwidth cell value (side length of hexagonal cells).
Hengl, T. (2006) Finding the right pixel size. Computers & Geosciences, 32, 1283–1298.
1 2 3 | data(samples)
# Computes hexagonal cell halfwidth for the 'samples' dataset using beta=0.5
hw <- MAPI_EstimateHalfwidth(samples, beta=0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.