raster_algebra
Perform addition or subtraction on two raster bands with automatic alignment. Specify source rasters, band index, operation, and destination path for the result.
Instructions
Perform algebraic operations (addition or subtraction) on two raster bands, handling alignment issues automatically.
Parameters:
raster1: Path to the first raster (.tif).
raster2: Path to the second raster (.tif).
band_index: Index of the band to process (1-based index).
operation: Either "add" or "subtract" to specify the calculation.
destination: Path to save the result as a new raster.
The function aligns rasters if needed, applies the selected operation, and saves the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raster1 | Yes | ||
| raster2 | Yes | ||
| band_index | Yes | ||
| operation | Yes | ||
| destination | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||