landsatCalibration: Radiometric calibration

Description Usage Arguments Value Author(s) Examples

Description

Convert raw Landsat or Aster satellite image values (the "digital number"), to radiance, reflectance or temperature.

Usage

1
2
3
dn2ref(x, filename='', ...)
dn2temp(x, filename='', ...)
dn2rad(x, filename='', ...)

Arguments

x

Satellite image object inherting from class 'Landsat'

filename

Optional. Filename for output file of radiance, reflectance or temperature values. If not provided these may be stored in a temporary file. You can also provide filename='default.tif', this will substitute 'default' with filename using the scene ID.

...

Additional arguments to writeRaster, such as the file format, and overwrite=TRUE

Value

A calibrated Landsat object.

Author(s)

Alice Laborte, Yann Chemin, Robert Hijmans, Matteo Mattiuzzi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## Not run: 
metafile <- system.file("external/L71129046_04620080329_MTL.txt", package="RemoteSensing")

#Create Landsat object
img <- landsat(metafile)

# calculate reflectance
ref <- dn2ref(img)
## calculate reflectance and save output as a tmp RasterBrick;
require(rgdal)
# whith filename='default.XXX' name
ref <- dn2ref(img,filename='default.tif') # to current directory
ref <- dn2ref(img,filename='default.img') # to current directory
ref <- dn2ref(img,filename='/path/to/default.tif') # to specified directory

# with user specified name
ref <- dn2ref(img,"ref.img")
# unlink("ref.img")

# true color:
# plotRGB(ref, 3,2,1, scale=0.36)
# false color:
# plotRGB(ref, 4,3,2, scale=0.45)

# calculate temperature (LST) from thermal bands
# here you can also apply the filename='default.tif'
temp <- dn2temp(img)
# plot(temp@thermal)

# or for the generation of a fully calibrated image
ref   <- dn2ref(img)
calib <- dn2temp(ref)
calib # reflectance bands
calib@thermal # LST bands


## End(Not run)

RemoteSensing documentation built on Feb. 7, 2020, 3 p.m.