R/compareDetrendMethods.R
compareDetrendMethods.RdRuns computeDetrendedRaster for each requested method and
produces: a comparison figure (all methods on a shared color scale, plus
difference panels against the first method), the gradeline fit diagnostic
when applicable, and optionally a KMZ in which each method is a separately
toggleable Google Earth overlay.
Object from the ProcessSpace pipeline (needs
buildXSectionPlot to have run if "crossSection" is among
the methods).
DEM path (unused when the DEM is stored on the object).
Character vector of methods to compare.
Interpolation engine passed to
computeDetrendedRaster. Default NULL: each method uses its
own default (krige for crossSection, broad-window IDW otherwise). Pass
"idw" to compare all methods on the same smoothed engine.
Base name for output files
(<sectionName>_detrendComparison.png / .kmz).
Shared color-scale limits (m).
Logical; also write the multi-overlay KMZ.
Invisibly, a list with rasters (named list of SpatRasters),
comparisonPlot, differencePlot, and gradelinePlot
(NULL unless "gradeline" was run).