waterOptions: Global options for water package

waterOptionsR Documentation

Global options for water package

Description

Sets or shows the global options of the water package. Inspired by rasterOptions() of the raster package (Robert J. Hijmans).

Usage

waterOptions(
  overwrite,
  writeResults,
  outputFolder,
  SRTMrepo,
  autoAoi,
  default = FALSE
)

Arguments

overwrite

Logical. If TRUE and writeResults is TRUE, the final outputs overwrite files of earlier sessions; a file written earlier in the same session is never overwritten (an object may still read it): a new name is used, with a warning (so, in one session, EB.tif keeps the first result). If FALSE, a time stamp is appended to the file name (name_YYYYmmddHHMMSS.tif).

writeResults

Logical. If TRUE (default FALSE) results are written to disk as GeoTIFF files: the final outputs (EB from METRIC.EB(), ET24 from ET24h(), DEM from getDEM() and prepareSRTMdata()) to outputFolder, and the intermediate results to terra's temporary files, with unique names. This is slower, but avoids out-of-memory problems with large images. Values are stored as 32-bit floats. The temporary files are deleted when the R session ends (they can be large for full scenes).

outputFolder

Name of a folder to save files, relative to the working directory.

SRTMrepo

A folder where SRTM grids are stored. Currently not used by prepareSRTMdata(); use its path argument

autoAoi

Deprecated and ignored, with a warning. An object called aoi in the workspace is no longer used: pass aoi to loadImage(), loadImageSR(), albedo() or the METRIC functions. See createAoi

default

Logical. If TRUE will revert all options to default values

Value

list of the current options (invisibly). If no arguments are provided the options are printed.

Author(s)

Guillermo Federico Olmedo

References

Robert J. Hijmans (2015). raster: Geographic Data Analysis and Modeling. R package version 2.4-18. https://CRAN.R-project.org/package=raster

See Also

Other support functions: checkSRTMgrids(), createAoi(), getDEM(), prepareSRTMdata()

Examples

# show the options
waterOptions()

water documentation built on Nov. 25, 2026, 5:08 p.m.