The hs_read function reads hyperspectral imagery from NEON's Airborne Observation Platform, and returns a Raster* object.

hs_read(filename, bands, crop = FALSE)

Arguments

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

Value

Raster* object containing hyperspectral data

Details

You can learn more the NEON AOP hyperspectral imagery at: https://www.neonscience.org/data-collection/airborne-remote-sensing

Examples

library(raster)
#> Loading required package: sp
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)