auto_gap_fill: Automated removal of gaps in SLC-off images using GNSPI

Description Usage Arguments Details Value References

View source: R/auto_gap_fill.R

Description

Uses the GNSPI algorithm from Zhu et al. See fill_gaps for details. In hilly areas, gap fill should be done after topographic correction.

Usage

1
2
3
auto_gap_fill(data_dir, wrspath, wrsrow, start_date, end_date,
  base_date = NULL, tc = TRUE, threshold = 1, n_cpus = 1,
  notify = print, verbose = TRUE, ...)

Arguments

data_dir

folder where input images are located, with filenames as output by the auto_preprocess_landsat function. This folder will be searched recursively for images (taking the below path/row, date, and topographic correction options into account).

wrspath

World Reference System (WRS) path

wrsrow

World Reference System (WRS) row

start_date

start date of period from which images will be chosen to fill cloudy areas in the base image (as Date object)

end_date

end date of period from which images will be chosen to fill cloudy areas in the the base image (as Date object)

base_date

ideal date for base image (base image will be chosen as the image among the available images that is closest to this date). If NULL, then the base image will be the image with the lowest cloud cover.

tc

if TRUE, use topographically corrected imagery as output by auto_preprocess_landsat. IF FALSE use bands 1-5 and 7 surface reflectance as output by unstack_ledaps or auto_preprocess_landsat (if auto_preprocess_landsat was also run with tc=FALSE).

threshold

maximum percent gap allowable in base image. Gap fill will not occur unless percent gap in base image is greater than this value.

n_cpus

the number of CPUs to use for processes that can run in parallel

notify

notifier to use (defaults to print function). See the notifyR package for one way of sending notifications from R. The notify function should accept a string as the only argument.

verbose

whether to print detailed status messages

...

additional arguments passed to fill_gaps, such as DN_min, DN_max, use_IDL, verbose, etc. See fill_gaps.

Details

The auto_gap_fill function allows an analyst to automatically construct a gap-filled image after specifying: data_dir (a folder of Landsat images), wrspath and wrsrow (the WRS-2 path/row to use), and start_date and end_date (a start and end date limiting the images to use in the algorithm). The analyst can also optionally specify a base_date, and the auto_gap_fill function will automatically pick the image closest to that date to use as the base image.

As the auto_gap_fill function automatically chooses images for inclusion in the gap fill process, it relies on having images stored on disk in a particular way. To ensure that images are correctly stored on your hard disk, use the auto_preprocess_landsat function to extract the original Landsat CDR hdf files from the USGS archive. The auto_preprocess_landsat function will ensure that images are extracted and renamed properly so that they can be used with the auto_gap_fill script.

Value

Raster* object with gap filled 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.


yinscapital/sat-locat-reference-team-lucc documentation built on May 14, 2019, 11:09 a.m.