Register an uploaded terrain
finalize_terrain_uploadRegisters an uploaded GeoTIFF as a terrain and starts its import workflow after a successful PUT, returning the terrain ID for status checks.
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.
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 | |
| vertical_datum_declared | No | TASK-4061: 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 | |||