Get a terrain upload URL
presign_terrain_uploadStep 1 of a terrain import: get a presigned S3 PUT URL for a GeoTIFF DEM.
The agent moves the bytes itself — no tool accepts file contents. After this
call, PUT the file straight to upload_url, sending the SAME Content-Type
you passed here (it is part of the signature; a mismatch is a 403
SignatureDoesNotMatch before it is anything else):
curl -sS -X PUT -H "Content-Type: image/tiff" --upload-file /path/dem.tif "$UPLOAD_URL"then call finalize_terrain_upload with the returned staging_key and
process_id. Nothing exists in Hydrata until finalize; the URL expires after
expires_in seconds (3600).
Platform guidance: keep the terrain extent within 5° across and 40,000 km²
(200 × 200 km). The API enforces that cap on its bbox-fetch path; an
uploaded GeoTIFF is only rejected above 5 GiB, but a larger DEM will not
mesh or run well. The GeoTIFF must carry a CRS; the import reprojects it to
the site's UTM zone and builds a hillshade. Fallback when a presigned PUT is
impossible: multipart-POST the file with the same credential to
/api/v2/anuga/projects//terrain/upload/ (form field file, optional
title), which creates the terrain in one step — then get_terrain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | File size in bytes (`stat -c %s <file>`). The API rejects > 5 GiB up front. Omit if unknown. | |
| filename | Yes | Base name of the GeoTIFF, e.g. 'dem.tif' (a name only — never contents) | |
| project_id | Yes | The project ID | |
| content_type | No | MIME type the PUT will send (default 'image/tiff'). It is SIGNED into the URL, so the PUT must send exactly this Content-Type header. | image/tiff |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||