Wait for a terrain import
get_terrainPoll a terrain's import until it is ready (or error), bounded by timeout_seconds.
Returns outcome — exactly one of ready, error, timed_out, not_found
(the project has no terrain yet; an unknown terrain_id is an API 404 error
instead) — plus the last status seen (creating → styling → ready | error)
and phase (that status, or not_found; never empty),
polls, elapsed_seconds and the full terrain record (its gn_layer is
the published elevation dataset pk once ready). An import takes minutes to
tens of minutes (the SAME 32 MB 1 m DEM measured 4.5 min once and 26 min
once — the worker's S3 download speed dominates), so timed_out is normal
and NOT a failure: keep calling with the same arguments while status is
still creating/styling; several calls in a row is expected. error is
terminal — the import failed and no default input rows were seeded; upload
a corrected GeoTIFF as a new terrain.
ready is written by the import task; the project's default input rows
(Boundary 01, Friction 01, Inflow 01, Rainfall 01, Building 01,
MeshRegion 01, one GeoNode layer each) are seeded by the NEXT task in the
chain and appear over the following ~30 s. Poll the input-layer list until
it is non-empty before attaching your own layer to a default row.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID | |
| terrain_id | No | The terrain ID from finalize_terrain_upload. Omit to follow the project's newest terrain. | |
| timeout_seconds | No | How long this call keeps polling before it returns `timed_out` (default 240, ceiling 280 — the prod /mcp/ proxy cuts a call at 300 s). 0 = one status read, no waiting. | |
| poll_interval_seconds | No | Seconds between polls (default 5) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||