Write a project input layer from GeoJSON
write_input_layerWrites GeoJSON features as a project input layer (boundary, friction, inflow, rainfall, building, mesh_region or culvert) into Hydrata's grid, replacing the default layer of that kind.
Instructions
Write a project input layer (boundary, friction, inflow, rainfall, building, mesh_region or culvert) from GeoJSON you send in this call.
No file, no key, no upload: the features go in features. Hydrata
converts them into the project's grid and puts them in the project's
default layer of that kind, replacing what it held (the old layer is kept,
unlinked). Unlike attach_input_layer there is nothing to poll.
Every feature must be the kind's geometry (lines for boundary, inflow and culvert; polygons for friction, rainfall, building and mesh_region); a feature of another geometry refuses the whole write and nothing changes. A culvert is one two-point line per culvert, Inlet first, then Outlet; its attributes are the culvert fields (name, shape, width_m, ... see the culvert guidance), nothing is renamed for you.
Limit: about 150 KB of GeoJSON (a few thousand vertices). A bigger layer is refused before anything is sent: ask the person to upload it in their browser with a request_input_upload link instead.
The layer is marked as written by your agent key and is UNREVIEWED until the user reviews it in their browser. INFLOWS: never invent an inflow location; take it from the study's files or give the user the ui_url to draw it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Which input this is: boundary, friction, inflow, rainfall, building, mesh_region or culvert ('structure' is a deprecated alias of building). | |
| method | No | One short phrase saying how you made these features (e.g. 'traced from the council PDF', 'digitised from the survey CSV'). Shown to the person who reviews the layer. | |
| features | Yes | A GeoJSON FeatureCollection with every feature of this kind. Coordinates are read as EPSG:4326 (lon/lat) unless the collection declares a `crs` member; Hydrata converts them into the project's grid. Multi* geometries are split into single ones. | |
| project_id | Yes | The project ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||