Apply an existing aligned analysis mask to a terrain mosaic

mask_terrain_mosaic(source, mask, filename)

Arguments

source

Path to a single-band terrain mosaic.

mask

Path to a one/NoData raster on the same CRS, resolution and cell alignment. Its extent must contain the source mosaic's extent.

filename

New output GeoTIFF path in an existing directory.

Value

Output path and grid/processing metadata. No study product is published.

Details

Uses native terra crop and mask with file-backed output. Mask NoData cells become output NoData; retained source samples, datatype and units are unchanged. It neither resamples nor converts elevations. A source-grid mismatch requires explicit reconciliation before this operation. The saved mask is read, not regenerated. A compound elevation CRS and a 2D mask CRS are compared by their horizontal components. terra may report their full CRS difference; the source's full CRS and elevation units remain unchanged. No dataset-size admission limits are imposed.