Register an uploaded terrain
finalize_terrain_uploadStep 2 of a terrain import: register the PUT GeoTIFF as a Terrain and start the import.
Instructions
Step 2 of a terrain import: register the PUT GeoTIFF as a Terrain and start the import.
Needs a launch-level agent key (the import can start AWS Batch); a read or draft key gets 403 AGENT_LEVEL_INSUFFICIENT — the user creates a launch key on the site's Agent keys page (/agents/).
Call this only after the presigned PUT returned 200. Creates the Terrain row
(status creating) and queues the import chain — reproject to UTM, publish
the layer + hillshade, style — which also seeds the project's six default
boundary, friction, inflow, rainfall, building and mesh-region rows.
Returns 202 with the terrain record; keep its id for get_terrain. A 400 UPLOAD_NOT_FOUND
means no object is at staging_key: the PUT did not land (check its status
code and Content-Type) — do not retry finalize until it has.
Heights the user says are on the ellipsoid (raw GPS or satellite heights): pass convert_to_egm2008=True so a sea-level (EGM2008) copy is made after the import. For a terrain already in Hydrata, use convert_terrain_datum instead.
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>",
"staging_key": "<staging_key>"
},
"name": "finalize_terrain_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Terrain title (default: the filename without .tif) | |
| process_id | No | `process_id` returned by presign_terrain_upload (pass it so the upload's progress record is reused; the API tolerates its absence) | |
| project_id | Yes | The project ID | |
| staging_key | Yes | `staging_key` returned by presign_terrain_upload | |
| levels_datum | No | The datum the PERSON'S levels (study, survey, tailwater) are on, e.g. `AHD`, `NAVD88`, `Ordnance Datum Newlyn` or an EPSG vertical code (`EPSG:5711`). A project fact, separate from the terrain's own datum. Pass it when the user told you; if they did not, ask them, do not guess. | |
| convert_to_egm2008 | No | True to have Hydrata also make a copy of the terrain shifted from ellipsoid heights to EGM2008 (sea-level) heights once the import is done. Only with vertical_datum_declared `ellipsoid`, the datum the user told you; the original stays as it is. Default false. | |
| vertical_datum_declared | No | The datum the user SAYS the heights are on: `ahd` (Australian Height Datum), `orthometric_egm2008` or `ellipsoid`. Pass it only when the user told you; if they did not, ask them, do not guess. Stored as the terrain's declared datum, which beats Hydrata's own inference. Omit when unknown. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||