Read the streams of a terrain and the corridor round them
get_stream_corridorRetrieve a terrain's streams and their widened corridor from kept drainage analysis, returning a GeoJSON polygon to use as a mesh region for finer stream meshing.
Instructions
Read the streams of a terrain and the corridor round them, from the terrain's kept drainage analysis.
A stream is where at least threshold_ha of ground drains through. The corridor is the streams widened by
half_width_m each side: a polygon to write as a mesh_region (write_input_layer) so the mesh is finer along the
streams. Use it instead of working streams out yourself, and pass its authored_method when you write the corridor.
Ask the user for the mesh region's resolution (a triangle edge length in metres, never finer than the terrain's
resolution_m).
It starts nothing (no line run, no drainage analysis, nothing written): a terrain with no kept drainage analysis is
refused in words. Returns the corridor (a GeoJSON Feature in lon/lat), its area, the streams largest first (drainage
area and length; their lines with include_stream_lines), the grid read, whether the drainage analysis is out of date
(with the sentence to relay) and authored_method. Read-only.
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>",
"terrain_id": "<terrain_id>",
"threshold_ha": "<threshold_ha>"
},
"name": "get_stream_corridor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | Keep the streams inside this box: [west, south, east, north] in degrees (lon/lat). | |
| grid | No | 'full' (high resolution) or 'quick' (the fast screen's coarser grid). Leave it out for the finest kept. | |
| project_id | Yes | The project ID | |
| terrain_id | Yes | The terrain whose streams to read (a delineation's `line.terrain_id`, or get_terrain) | |
| half_width_m | No | How far the corridor reaches each side of a stream, in metres (0 to 1000; default 40). 0 gives the streams with no corridor. | |
| threshold_ha | Yes | Where a stream starts: the drainage area in hectares that must drain through a cell for it to be a stream (0.1 to 1,000,000). Larger keeps only the bigger streams. Choose it with the user for what the model needs. | |
| delineation_id | No | Keep the streams inside this line's catchments (a line on this terrain). Or give bbox; leave both out for the whole terrain. | |
| include_stream_lines | No | False (default): each stream as its drainage area and length only. True: with its line in lon/lat too. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||