Create sub-catchments from a line's catchments
create_sub_catchmentsCreate sub-catchments from a line's High-resolution catchments, each draining to a node with area, slope, flow length, node totals, and reaches; use a target count or stream threshold.
Instructions
Create sub-catchments from a line's catchments: each sub-catchment drains to a node, with its measured facts (area, slope, flow length...), the nodes' total catchments and the reaches between nodes.
The line must have a High resolution result: a fast-screen result is refused with the sentence 'High res only' (run
the line at High resolution first). Creating is by a target number (about 20 by default) or a stream threshold, not
both. On a terrain too large for the web server it is done on cloud compute: the answer is creating and
get_sub_catchments waits for it. The result is a draft: tell the user a person confirms it on the map (you cannot),
and give them the link (ui_url). Shapes stay on the map. With estimate_only, nothing is created: the answer is
the threshold and number Create would make (the number made can differ from the one asked for).
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": {
"project_id": "<project_id>",
"delineation_id": "<delineation_id>"
},
"name": "create_sub_catchments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A short name for a new set (up to 200 characters) | |
| project_id | Yes | The project ID (Editor rights) | |
| target_count | No | About how many sub-catchments to make (1 to 500). The default is about 20. Not with threshold_m2. | |
| threshold_m2 | No | Instead of a target number: the stream threshold in square metres (a stream starts where this much ground drains to it). Not with target_count. | |
| catchment_ids | No | The line's catchments to cover (get_delineation's catchment ids). Default: all of them (or the set's own). | |
| estimate_only | No | True: create nothing, and answer what Create would make with these choices (the stream threshold and the number of sub-catchments and nodes, the engine's own figures), as the step shows before Create. | |
| forced_points | No | Places that must be a node, as [[lon, lat], ...] (WGS84), for example a gauge or a road crossing. | |
| delineation_id | Yes | `delineation_id` of a line run at High resolution (read it with get_delineation) | |
| sub_catchments_id | No | To create a set again (its draft, or a new draft after a confirmed version): its `sub_catchments_id`. Omit it to create a new set. An agent creates again only a set an agent made. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||