read_ASTER_txt {photobiologyInOut} | R Documentation |
Read File downloaded from ASTER data base.
Description
Reads and parses the header of a test file as available through the ASTER reflectance database. The Name field is retrieved and copied to attribute "what.measured". The header of the file is preserved as a comment.
Usage
read_ASTER_txt(
file,
date = NULL,
geocode = NULL,
label = NULL,
tz = NULL,
locale = readr::default_locale(),
npixels = Inf
)
Arguments
file |
character string |
date |
a |
geocode |
A data frame with columns |
label |
character string, but if |
tz |
character Ignored. |
locale |
The locale controls defaults that vary from place to place. The
default locale is US-centric (like R), but you can use
|
npixels |
integer Number of pixels in spectral data. |
Value
A raw_spct object.
Note
The header in these files has metadata information, but mostly on the
origin of the data. For a date and/or geocode are to be added to the return
object it must be supplied by the user. as well as the date-time. Some
metadata is extracted and added as attributes, while the whole header is
copied to the comment
attribute.
References
Baldridge, A.; Hook, S.; Grove, C. & Rivera, G. (2009) The ASTER spectral library version 2.0. Remote Sensing of Environment. 113, 711-715
Examples
file.name <-
system.file("extdata", "drygrass-spectrum.txt",
package = "photobiologyInOut", mustWork = TRUE)
fred.spct <- read_ASTER_txt(file = file.name, npixels = Inf)
fred.spct
getWhatMeasured(fred.spct)
cat(comment(fred.spct))