Extract values from GeoTIFF image(s)
extract_values.Rd
Extract values from one or more GeoTIFF images based on a set of point locations, supplied as (x, y) or (longitude, latitude) coordinates. If a path to a folder is provided, all images in the folder will be processed.
Arguments
- path
path to a folder containing one or more GeoTIFF files e.g. "~/Documents/rasters", or path pointing to one or more GeoTIFF files e.g. c("~/rasters/clay.tif", "~/rasters/density.tif")
- xy_coords
a data frame of (x, y) or (longitude, latitude) coordinates. Note the order - incorrect order of coordinates may result in erroneous or NaN results.
- method
one of "simple", which returns the exact value at the cell or pixel that the point falls in, or "bilinear", which returns a value interpolated from the values of the four nearest raster cells.