View source: R/03-water-indices.R
| analyze_water_bodies | R Documentation |
Comprehensive water body analysis using multiple water indices to classify and characterize water features.
analyze_water_bodies(
green,
nir,
swir1 = NULL,
region_boundary = NULL,
water_threshold_ndwi = 0.3,
water_threshold_mndwi = 0.5,
output_folder = NULL,
verbose = FALSE
)
green |
Green band SpatRaster or file path |
nir |
NIR band SpatRaster or file path |
swir1 |
SWIR1 band SpatRaster or file path |
region_boundary |
Optional region boundary for analysis |
water_threshold_ndwi |
NDWI threshold for water detection (default: 0.3) |
water_threshold_mndwi |
MNDWI threshold for water detection (default: 0.5) |
output_folder |
Optional output directory |
verbose |
Print progress messages |
List with water analysis results
## Not run:
# These examples require external data files not included with the package
# Comprehensive water analysis
water_analysis <- analyze_water_bodies(
green = "green.tif",
nir = "nir.tif",
swir1 = "swir1.tif",
region_boundary = "study_area.shp",
verbose = TRUE
)
# Access results
water_analysis$water_indices # All calculated indices
water_analysis$water_mask # Binary water mask
water_analysis$statistics # Water body statistics
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.