lsat_clean_data: Clean Landsat surface reflectance data

View source: R/lsat_clean_data.R

lsat_clean_dataR Documentation

Clean Landsat surface reflectance data

Description

This function enables users to filter out surface reflectance measurements that exhibit: (1) clouds, cloud shadows, snow, or water flagged by the CFMask algorithm; (2) surface water over the Landsat record; (3) impossibly high reflectance (>1.0) and abnormally low reflectance (<0.005); (4) scene cloud cover above a user-defined threshold; (5) geometric uncertainty above a user-defined threshold; (6) solar zenith angle above a user-defined threshold.

Usage

lsat_clean_data(
  dt,
  cloud.max = 80,
  geom.max = 30,
  sza.max = 60,
  filter.cfmask.snow = T,
  filter.cfmask.water = T,
  filter.jrc.water = T
)

Arguments

dt

Data.table generated by calling lsat_format_data().

cloud.max

Maximum allowable cloud cover in Landsat scene (percentage).

geom.max

Maximum allowable geometric uncertainty (meters).

sza.max

Maximum allowable solar zenith angle (degrees).

filter.cfmask.snow

(TRUE/FALSE) Remove measurements with CFmask flag = snow.

filter.cfmask.water

(TRUE/FALSE) Remove measurements with CFmask flag = water.

filter.jrc.water

(TRUE/FALSE) Remove sample sites that were ever inundated based on the maximum surface water extent variable from the JRC Global Surface Water Dataset.

Value

A data.table that includes Landsat measurements that met the quality control criteria.

Examples

data(lsat.example.dt)
lsat.dt <- lsat_format_data(lsat.example.dt)
lsat.dt <- lsat_clean_data(lsat.dt)
lsat.dt

logan-berner/lsatTS documentation built on Oct. 21, 2024, 12:23 a.m.