Raster Calculator
raster_calculatorPerform band math on raster layers using expressions like 'LayerName@band'. Writes results as GeoTIFF to a specified path, using a reference layer for grid/extent.
Instructions
Band math via the QGIS raster calculator. Reference loaded raster layers in the expression as 'LayerName@band' (e.g. '("dem@1" > 1000) * 1'). Writes a GeoTIFF to output_path. Output grid/extent taken from reference_layer (layer id or name), defaulting to the first loaded 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": {
"expression": "<expression>",
"output_path": "<output_path>"
},
"name": "raster_calculator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | ||
| output_path | Yes | ||
| reference_layer | No |