Start a 3D building extract around an address or a WGS84 point
Backs the aireon hub '3D extract' admin page and the Grasshopper/API path. Geocodes the address (geo.admin SearchServer) - or, when lat+lng are given, takes that WGS84 point directly (LV95 via the swisstopo REFRAME service; label and EGID from the GWR building under the point, best effort) - finds the newest per-sheet swisstopo swissBUILDINGS3D 3.0 Beta tile via the data.geo.admin.ch STAC API (FileGDB, cached under cache/building3d/), clips all buildings intersecting the ±radius_m box around the point (whole buildings, not sliced; layers Building_solid + Roof_solid), builds an OBJ/MTL mesh (local origin at the point, Y-up) + a georeferenced DXF (3DFACE mesh on WALL/ROOF layers, absolute LV95/LN02 metres - opens in AutoCAD/BricsCAD/Rhino/SketchUp) + a DWG R2000 (same mesh, converted from the DXF via LibreDWG when available) + GeoPackage (EPSG:2056, full attributes incl. EGID and heights) + preview render + README, and zips it as <slug>_3d_<radius>m.zip.
Responds 202 immediately with a jobId. Two ways to get the result: (1) give an email and the zip (or a failure report - unknown address, no tile covering the point, empty box) arrives by Resend in about a minute, exactly as before; (2) poll statusUrl until status is ready, then GET downloadUrl (the zip) or downloadUrl/{file} for one member. Without email no mail is sent at all. Outputs are kept under cache/building3d/jobs/<jobId>/ and evicted least-recently-used once the jobs directory exceeds its cap (default 5 GiB, BUILDING3D_JOBS_MAX_BYTES); the download endpoints touch a job on every fetch, so a result that keeps being fetched stays.
Concurrency: at most 3 extractions per pm2 worker (RES runs 2 cluster workers, so 6 box-wide); beyond that the request is answered 429 and should simply be retried a minute later.
https://res.aireon.ch/res_api/building3d-extractAuthorization
Request body JSON required
Any of the following:
- Option 1
- Option 2
Example requests
{
"address": "Rainweg 1 4710 Balsthal",
"radius_m": 10,
"email": "someone@example.com"
}{
"lat": 47.3159,
"lng": 7.6931,
"radius_m": 25
}Returns
202
Job accepted and the worker spawned. Legacy fields (ok, address, radius_m, email, note) are unchanged for the hub form; the job fields tell an API client where to poll and download.