Input a raster, specify band number if you want anything but the first band. xy is expected to be a matrix: cbind(lon, lat).

locationinfo(x, xy, band = 1L)

Arguments

x

raster data source

xy

points on the raster (we assume longlat)

band

which band to read, defaults to 1

Value

numeric vector

Details

Can be parallelized by setting plan() with the 'future' package (via 'furrr').

Examples

geb <- "/vsicurl/https://gebco2023.s3.valeria.science/gebco_2023_land_cog.tif"
pt <- cbind(c(175.28, -4.72), c(-37.78, 52.22))
locationinfo(geb, pt)
#> [1]  33 -34