fill_gaps: Perform SLC-off gap fill of Landsat 7 ETM+ image

Description Usage Arguments Details Value References Examples

View source: R/fill_gaps.R

Description

Calls GNSPI.pro IDL script by Xiaolin Zhu to fill gaps in SLC-off Landsat 7 ETM+ image. The script requires fill to be a TM (Landsat 5) image. slc_off must be a Landsat 7 SLC-off image.

Usage

1
2
3
4
5
fill_gaps(slc_off, fill, timeseries = c(), out_base = NULL, ext = "tif",
  algorithm = "GNSPI_IDL", sample_size = 20, size_wind = 12,
  class_num = 4, DN_min = 0, DN_max = 1, patch_long = 1000,
  idl = "C:/Program Files/Exelis/IDL83/bin/bin.x86_64/idl.exe",
  verbose = FALSE, overwrite = FALSE)

Arguments

slc_off

the SLC-off Landsat 7 file to gap fill, as a Raster*

fill

the first TM image to use to fill in the gaps, as a Raster*

timeseries

a timeseries of TM images as Raster* objects to use as additional inputs to the gap fill algorithm (optional)

out_base

path and base filename for the output file. The script will save the output files by appending "_GNSPI.envi" and "_GNSPI_uncertainty.envi" to this base filename.

ext

file extension to use when and when saving output rasters (determines output file format). Must be supported by writeRaster.

algorithm

the algorithm to use, as a string ("GNSPI_IDL" is currently the only supported algorithm)

sample_size

the sample size of sample pixels

size_wind

the maximum window size

class_num

the estimated number of classes

DN_min

the minimum DN value of the image

DN_max

the maximum DN value of the image

patch_long

the size of block, to process whole ETM scene, set to 1000

idl

path to the IDL binary

verbose

whether to print detailed status messages

overwrite

whether to overwrite output files if they already exist

Details

If supplied, timeseries should be a list of TM images. Performing gap fill using SLC-Off ETM+ images as the input is not yet supported.

Pixels in gaps, background, and/or clouds in slc_off, input_image, and the images in timeseries should be coded as 0.

Value

a list of two rasters: 1) "filled", the gap filled image, and 2) "uncertainty", the uncertainty image.

References

Zhu, X., Liu, D., Chen, J., 2012. A new geostatistical approach for filling gaps in Landsat ETM+ SLC-off images. Remote Sensing of Environment 124, 49–60.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
slc_off <- brick(system.file('tests', 'testthat_idl', 'fill_gaps', 
'TM20100429_toaR_gap', package='teamlucc'))
fill <- brick(system.file('tests', 'testthat_idl', 'fill_gaps', 
'TM20100515_toaR', package='teamlucc'))
timeseries <- c(brick(system.file('tests', 'testthat_idl', 'fill_gaps', 
'TM20100208_toaR', package='teamlucc')))
filled <- fill_gaps(slc_off, fill, timeseries)

## End(Not run)

azvoleff/teamlucc documentation built on June 4, 2017, 12:08 a.m.