closest_available_cell: Determine the closest non-NA pixel given [lon,lat] and a lut...

View source: R/stars.R

closest_available_cellR Documentation

Determine the closest non-NA pixel given [lon,lat] and a lut raster

Description

Determine the closest non-NA pixel given [lon,lat] and a lut raster

Usage

closest_available_cell(
  x = volcano_points(),
  lut = make_raster_lut(),
  verbose = FALSE
)

Arguments

x

sf POINT data, data.frame or with [lon,lat] coordinates in that order and assumed to be aligned with the CRS of the lut

lut

stars object, look-up with precomputed closest non-NA cells. See make_raster_lut

verbose

logical, if TRUE output messages

Value

sf object with two attributes index (the index of the closets non-NA point) and original (the original index)


BigelowLab/twinkle documentation built on Jan. 26, 2025, 6:34 a.m.