hs_read: Read hyperspectral imagery from the NEON AOP

Description Usage Arguments Details Value Examples

View source: R/hs_read.R

Description

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

Usage

1
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

Details

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

Value

Raster* object containing hyperspectral data

Examples

1
2
3
4
5
6
7
8
9
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)

earthlab/neonaop documentation built on March 27, 2021, 12:28 p.m.