Adds the detrended raster to the transectObject. The actual computation lives in computeDetrendedRaster, which offers three methods; this wrapper keeps the classic pipeline signature.

rasterPlotter(
  transectObject,
  rasterDir = "GeoData/Raster/ChildsDEM_m.tif",
  interpSmoothness = "Smooth",
  method = "crossSection",
  engine = NULL,
  ...
)

Arguments

transectObject

Object created by generateCrossSections; the default method additionally needs buildXSectionPlot to have run.

rasterDir

File path of the DEM raster (unused when the DEM is already stored on the transectObject by processSpace).

interpSmoothness

"Smooth" or "Coarse" (crossSection method only): kriging with a 20-point neighborhood vs nearest single point (much faster, blockier).

method

Detrending method, one of "crossSection" (default), "streamLine", "gradeline" - see computeDetrendedRaster.

engine

Interpolation engine override (see computeDetrendedRaster); NULL picks the method's default.

...

Ignored (accepted so pipeline wrappers can pass shared arguments through).

Value

transectObject with $detrendedRaster added: a terra SpatRaster with layer DetrendedElevation (plus KrigeVar for the crossSection method).