The hs_read
function reads hyperspectral imagery from NEON's Airborne
Observation Platform, and returns a Raster* object.
hs_read(filename, bands, crop = FALSE)
filename | Path to an .h5 file containing L3 hyperspectral data (char) |
---|---|
bands | Indices of bands to read (integer) |
crop | Optional extent object to use in cropping |
Raster* object containing hyperspectral data
You can learn more the NEON AOP hyperspectral imagery at: https://www.neonscience.org/data-collection/airborne-remote-sensing
library(raster)#>path_to_file <- system.file('extdata', 'ex.h5', package = 'neonhs') # read the full spatial extent of a file r <- hs_read(path_to_file, bands = 1:4) # read a subset of a file based on a cropping extent extent_to_read <- extent(c(257000, 257020, 4111980, 4112100)) subset_r <- hs_read(path_to_file, bands = 1:4, crop = extent_to_read)