Learn R Programming

sits (version 1.12.0)

sits_cloud_filter: cloud filter

Description

This function tries to remove clouds in the ndvi band of a satellite image time series. It looks for points where the value of the NDVI band goes down abruptly. These points are taken as those whose difference is more than a cutoff value which is set by the user. Then it applies an spline interploation. Finally, the function applies a whitakker smoother.

Usage

sits_cloud_filter(data.tb = NULL, cutoff = 0.25, bands_suffix = "cf",
  apply_whit = FALSE, lambda_whit = 1)

Arguments

data.tb

A tibble with time series data and metadata with only the "ndvi" band.

cutoff

A numeric value for the maximum acceptable value of a NDVI difference.

bands_suffix

Suffix to rename the filtered bands.

apply_whit

Apply the whittaker smoother after filtering? The default value is FALSE.

lambda_whit

Lambda parameter of the whittaker smoother.

Value

A sits tibble with same samples and the new bands.

Examples

Run this code
# NOT RUN {
# Read a set of samples of forest/non-forest in Amazonia
# This is an area full of clouds
data(prodes_226_064)
# Select the NDVI band of the first point
point_ndvi.tb <- sits_select_bands(prodes_226_064[1,], ndvi)
# Apply the cloud filter
point_cld.tb <- sits_cloud_filter(point_ndvi.tb)
# Merge the filtered with the raw data
point2.tb <- sits_merge (point_ndvi.tb, point_cld.tb)
# Plot the result
sits_plot (point2.tb)
# }

Run the code above in your browser using DataLab