landsat-class
.
The actual reading is done with readTIFF in the
\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}tifftiff package, so that package must be installed for
read.landsat
to work.
read.landsat(file, band = "all", emissivity = 0.984, decimate, debug = getOption("oceDebug"))
emissivity
in the metadata
slot of the
resultant object. This is used in the
calculation of surface temperature, as explained in the discussion of
accessor functions for landsat-class
. The default value is
from Konda et al. (1994). These authors suggest an uncertainty of 0.04,
but a wider range of values can be found in the literature. The value of
metadata$emissivity
is easy to alter, either as a single value or
as a matrix, yielding flexibility of calcuation.decimate=10
, to plot the image to determine a subregion
of interest, and then to use landsatTrim
to trim the image.landsat-class
, with the conventional Oce
slots metadata
, data
and processingLog
. The
metadata
is mainly intended for use by Oce functions, but for generality
it also contains an entry named header
that represents the full image
header in a list (with names made lower-case). The data
slot holds
matrices of the data in the requested bands, and users may add extra matrices
if desired, e.g. to store calculated quantities.
landsat-class
). In R, many operations involving
copying data, so that dealing with full-scale landsat images can overwhelm
computers with storage under 8GB. For this reason, it is typical to read just
the bands that are of interest. It is also helpful to use
landsatTrim
to trim the data to a geographical range, or
to use decimate
to get a coarse view of the domain, especially
early in an analysis.read.landsat
relies on a strict convention for the
names of the files in those directories. Those file names were found by
inspection of some data, on the assumption that similar patterns will hold for
other datasets for any given satellite. This is a brittle approach and it
should be born in mind if read.landsat
fails for a given dataset.
For Landsat 8, there are 11 bands, with names "aerosol"
(band 1),
"blue"
(band 2), "green"
(band 3), "red"
(band 4),
"nir"
(band 5), "swir1"
(band 6), "swir2"
(band 7),
"panchromatic"
(band 8), "cirrus"
(band 9), "tirs1"
(band
10), and "tirs2"
(band 11).
In addition to the above, setting band="terralook"
may be used as
an abbreviation for band=c("red", "green", "nir")
.For Landsat 7, there 8 bands, with names "blue"
(band 1), "green"
(band 2), "red"
(band 3), "nir"
(band 4), "swir1"
(band
5), "tir1"
(band 6A), "tir2"
(band 6B), "swir2"
(band 7)
and "panchromatic"
(band 8).
For Landsat 4 and 5, the bands similar to Landsat 7 but without
"panchromatic"
(band 8).
landsat-class
for more information on landsat
objects,
especially band information. Use landsatTrim
to trim Landsat
objects geographically and landsatAdd
to add new ``bands.'' The
accessor operator ([[
) is used to access band information, full or
decimated, and to access certain derived quantities. A sample dataset named
landsat
is provided by the \href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}oceoce package.Other things related to landsat
data: [[,landsat-method
,
landsat-class
, landsatAdd
,
landsatTrim
, landsat
,
plot,landsat-method
,
summary,landsat-method