raster.merge_tiffs()
Merge GeoTIFFs, preserving band names from the first source.
Usage
raster.merge_tiffs(
src_files, dst_file, *, method="first", mem_limit_mb=10000, profile=None
)Parameters
src_files: Sequence[str | Path | UPath]-
Source files, all in the same CRS.
dst_file: str | Path | UPath-
Output file.
method: str = "first"-
Overlap method accepted by
rasterio.merge.merge. mem_limit_mb: int = 10000-
Merge memory limit in megabytes.
profile: dict[str, Any] or None = None- Output profile overrides.
Raises
ValueError-
If
src_filesis empty or contains different CRSs. FileNotFoundError-
If any source file does not exist.
RuntimeError- If merging fails.