View source: R/climateExtract.R
get_near_nona | R Documentation |
Return cell number of the nearest data point available in the the raster layer
get_near_nona(x = x, y = y, x_cell = NULL)
x |
raster object (raster, rasterStack, rasterBrick or SpatRaster) |
y |
point as an sf, sp or SpatVector object |
x_cell |
cell id if already extracted, if not provide this will be computed |
This function links a raster cell id to each points and search for the nearest cell with data (not NA) if the points fall within a cell with NA.
a list of cell for all points. Point falling in NA cell are assigned to the nearest with a value within a range of 3 cell around the points. The sf of points with NA is provided and the distance to the nearest cell with a non NA value.
Reto Schmucki
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.