Skip to content
Navigation

Single-building 3D model (OBJ / GLB / CityJSON / DXF), synchronous

Proxy for the Contoor 3D API (project_res_3D_api, FastAPI, systemd unit contoor-3d-api on the RES box, published at contoor-api-contabo.gisjoe.com). RES adds the RES token, the request allowlist and RES-hosted artifact URLs so one contract and one credential cover parcels and meshes.

Resolves the building under lat/lng (cadastral footprint via WFS), runs the roofer LoD2.2 reconstruction on the swissSURFACE3D point cloud if no cached model exists, and returns download links per format. A cache hit answers in well under a second; a fresh reconstruction takes seconds to a few minutes (proxy timeout 180 s → 504; retry later, the upstream job keeps running and the next call is a cache hit). Pass buildingId from an earlier answer to skip the lookup. package: true also builds a ZIP with every generated format. Geometry in the OBJ/GLB is in LV95 metres with a local origin; the DXF is absolute LV95/LN02.

POST
https://res.aireon.ch/res_api/3d/building_model

Authorization

  • ResApiToken
    API key in header
    required

Request body JSON required

  • lat
    optional
    number

    WGS84 latitude (inside Switzerland).

  • lng
    optional
    number

    WGS84 longitude (inside Switzerland).

  • buildingId
    optional
    string

    Alternative to lat/lng: a building id from a previous answer.

    pattern: ^[a-f0-9]{64}$
  • formats
    optional
    array of
    cityjson
    or
    obj
    or
    glb
    or
    dxf

    Requested output formats.

    default: ["obj","glb"]
  • package
    optional
    boolean
    default: false
  • buffer_m
    optional
    number

    Footprint selection buffer in metres (upstream default).

Returns

200

Model artifacts are ready.

JSON
  • buildingId
    string
    required

    Stable id of the footprint the 3D service resolved (sha256 of its geometry). Reuse it in later calls to skip the WFS lookup.

    pattern: ^[a-f0-9]{64}$
  • cacheHit
    map of
    boolean
    required

    Per format: whether the artifact already existed upstream.

  • outputPaths
    map of
    string | null
    required

    Upstream repo-relative paths (informational).

  • files
    map of
    string
    required

    RES-hosted download paths (/res_api/3d/building_model/file/{buildingId}/{file}, token required) keyed by format plus zip when package was requested.

  • input
    optional
    object
  • note
    optional
    string

400

Invalid request.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

401

Authentication missing or invalid.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

403

Authenticated but not permitted.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

502

The 3D service is unreachable or answered with an error (its status and body are relayed in upstream_status / upstream).
JSON
  • error
    optional
    string
  • upstream_status
    optional
    integer
  • upstream
    optional
    unknown
  • detail
    optional
    string

504

The 3D service did not answer within the proxy timeout.
JSON
  • error
    optional
    string
  • detail
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close