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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"raster1": "<raster1>",
"raster2": "<raster2>",
"band_index": "<band_index>",
"operation": "<operation>",
"destination": "<destination>"
},
"name": "raster_algebra"
}
}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 | |||