weighted_band_sum
Compute a weighted sum of all bands in a raster image using specified weights to create a single-band output. Provide source raster, list of weights (matching number of bands and summing to 1), and destination path.
Instructions
Compute a weighted sum of all bands in a raster using specified weights.
Parameters:
source: Path to the input multi-band raster file.
weights: List of weights (must match number of bands and sum to 1).
destination: Path to save the output single-band raster.
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": {
"source": "<source>",
"weights": "<weights>",
"destination": "<destination>"
},
"name": "weighted_band_sum"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| weights | Yes | ||
| destination | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||