metadata
,
data
and processingLog
. Landsat data are available at
several websites (see e.g. [1]). Although the various functions may work
for other satellites, the discussion here focusses on Landsat 8 and Landsat
7. Band 8 is panchromatic, and has the highest resolution. For convenience of
programming, read.landsat
subsamples the tirs1
and
tirs2
bands to the 30m resultion of the other bands. See Reference
[3] for information about the evolution of Landsat 8 calibration
coefficients, which as of summer 2014 are still subject to change.
tirs1
and tirs2
, which
are at two different gain settings, with identical wavelength span for
each, which roughly matches the range of the Landsat-8 bands tirs1
and tirs2
combined. This may seem confusing, but it lets code like
plot(im, band="tirs1")
to work with both Landsat-8 and Landsat-7..------------------------------------------------------------------------------. | Band | Band | Band | Wavelength | Resolution | | No. | Contents | Name | (micrometers) | (meters) | |------+---------------------------+--------------+---------------+------------| | 1 | Blue | blue | 0.45 - 0.52 | 30 | | 2 | Green | green | 0.52 - 0.60 | 30 | | 3 | Red | red | 0.63 - 0.69 | 30 | | 4 | Near IR | nir | 0.77 - 0.90 | 30 | | 5 | SWIR | swir1 | 1.55 - 1.75 | 30 | | 6 | Thermal IR | tirs1 | 10.4 - 12.50 | 30 | | 7 | Thermal IR | tirs2 | 10.4 - 12.50 | 30 | | 8 | SWIR | swir2 | 2.09 - 2.35 | 30 | | 9 | Panchromatic | panchromatic | 0.52 - 0.90 | 15 | .------------------------------------------------------------------------------.
landsat
. Accessing data values. The data may be accessed with e.g.
landsat[["panchromatic"]]
, for the panchromatic band. If a new
``band'' is added with landsatAdd
, it may be referred by
name. In all cases, a second argument can be provided, to govern
decimation. If this is missing, all the relevant data are returned. If
this is present and equal to TRUE
, then the data will be
automatically decimated (subsampled) to give approximately 800 elements in
the longest side of the matrix. If this is present and numerical, then its
value governs decimation. For example,
landsat[["panchromatic",TRUE]]
will auto-decimate, typically
reducing the grid width and height from 16000 to about 800. Similarly,
landsat[["panchromatic",10]]
will reduce width and height to about
1600. On machines with limited RAM (e.g. under about 6GB), decimation is a
good idea in almost all processing steps. It also makes sense for
plotting, and in fact is done through the decimate
argument of
plot.landsat
.
Accessing derived data. One may retrieve several derived quantities
that are calculated from data stored in the object:
landsat[["longitude"]]
and landsat[["latitude"]]
give pixel
locations. Accessing landsat[["temperature"]]
creates an estimate
of ground temperature as follows (see [4]). First, the ``count value'' in
band 10, denoted $b_{10}$ say, is scaled with coefficients stored
in the image metadata using
$\lambda_L=b_{10}M_L+A_L$ where $M_L$
and $A_L$ are values stored in the metadata (e.g. the first in
landsat@metadata$header$radiance_mult_band_10
) Then the result is
used, again with coefficients in the metadata, to compute Celcius
temperature $T=K_2/ln(\epsilon
K_1/\lambda_L+1)-273.15$.
The value of the emissivity $\epsilon$ is set to unity by
read.landsat
, although it can be changed easily later, by
assigning a new value to landsat@metadata$emissivity
. The default
emissivity value set by read.landsat
is from [11], and is
within the oceanic range suggested by [5]. Adjustment is as simple as
altering landsat@metadata$emissivity
. This value can be a single
number meant to apply for the whole image, or a matrix with dimensions
matching those of band 10. The matrix case is probably more useful for
images of land, where one might wish to account for the different
emissivities of soil and vegetation, etc.; for example, Table 4 of [9]
lists 0.9668 for soil and 0.9863 for vegetation, while Table 5 of [10]
lists 0.971 and 0.987 for the same quantities.
Accessing metadata. Anything in the metadata can be accessed by
name, e.g. landsat[["time"]]
. Note that some items are simply
copied over from the source data file and are not altered by e.g.
decimation. An exception is the lat-lon box, which is altered by
landsatTrim
.
Overview of contents. The summary
method displays information
about the object.
x
are
contained within x@data$aerosol$msb
and x@data$aerosol$lsb
,
each of which is a matrix of raw values. The results may be combined as
e.g. 256L*as.integer(x@data[[i]]$msb) +
as.integer(x@data[[i]]$lsb)
, and this is what is returned by executing
x[["aerosol"]]
. Landsat data files typically occupy approximately a
gigabyte of storage. That means that corresponding Oce objects are about
the same size, and this can pose significant problems on computers with
less than 8GB of memory. It is sensible to specify bands of interest when
reading data with read.landsat
, and also to use
landsatTrim
to isolate geographical regions that need
processing.
Experts may need to get direct access to the data, and this is easy because
all Landsat objects (regardless of satellite) use a similar storage form.
Band information is stored in byte form, to conserve space. Two bytes are
used for each pixel in Landsat-8 objects, with just one for other objects.
For example, if a Landsat-8 object named L
contains the tirs1
band, the most- and least-significant bytes will be stored in matrices
L@data$tirs1$msb
and L@data$tirs1$lsb
. A similar Landsat-7
object would have the same items, but msb
would be just the value
0x00
.
Derived bands, which may be added to a landsat object with
landsatAdd
, are not stored in byte matrices. Instead they
are stored in numerical matrices, which means that they use 4X more storage
space for Landsat-8 images, and 8X more storage space for other satellites.
A computer needs at least 8GB of RAM to work with such data.
2.
3.
4.
5.
6.
7.
8.
9. Yu, X. X. Guo and Z. Wu., 2014. Land Surface Temperature Retrieval from
Landsat 8 TIRS-Comparison between Radiative Transfer Equation-Based Method,
Split Window Algorithm and Single Channel Method, Remote Sensing, 6,
9829-9652.
10. Rajeshwari, A., and N. D. Mani, 2014. Estimation of land surface
temperature of Dindigul district using Landsat 8 data. International
Journal of Research in Engineering and Technology, 3(5), 122-126.
11. Konda, M. Imasato N., Nishi, K., and T. Toda, 1994. Measurement of the Sea
Surface Emissivity. Journal of Oceanography, 50, 17:30.
read.landsat
or read.oce
, and one such file is
provided by the ocedata
package as a dataset named landsat
. Plots may be made with plot.landsat
. Since plotting can be
quite slow, decimation is available both in the plotting function and as
the separate function decimate
. Images may be subsetted with
landsatTrim
.