raster_algebra
Perform addition or subtraction on raster band data, automatically aligning mismatched rasters, and save the output as a new geospatial file for efficient geospatial analysis.
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 |
---|---|---|---|
band_index | Yes | ||
destination | Yes | ||
operation | Yes | ||
raster1 | Yes | ||
raster2 | Yes |
Input Schema (JSON Schema)
{
"properties": {
"band_index": {
"title": "Band Index",
"type": "integer"
},
"destination": {
"title": "Destination",
"type": "string"
},
"operation": {
"title": "Operation",
"type": "string"
},
"raster1": {
"title": "Raster1",
"type": "string"
},
"raster2": {
"title": "Raster2",
"type": "string"
}
},
"required": [
"raster1",
"raster2",
"band_index",
"operation",
"destination"
],
"title": "raster_algebraArguments",
"type": "object"
}