Skip to content
Navigation

Building footprints with heights and volumes (GeoJSON, sync)

Building footprints with heights and volumes, synchronously, as a GeoJSON FeatureCollection - the endpoint a Grasshopper / Rhino / CAD client extrudes locally.

Source: the materialised bo_buildings_vol table (one row per cadastral AV footprint, 2.63 M buildings nationwide, integrated volume cascade roofer LoD2.2 → footprint prism → GWR → flat prism; rebuilt weekly) LEFT JOINed with the roofer LoD2.2 roof statistics (building_footprint_rf).

Select buildings by exactly one of:

  • point + radius - lat, lng, radius_m (1–500, default 100): every footprint within radius_m metres (exact test in LV95);
  • bbox - bbox=minLng,minLat,maxLng,maxLat (WGS84, at most ~1.5 km per side): every footprint intersecting the box;
  • parcel - egrid=CH…: buildings whose point-on-surface lies inside the parcel (parcel geometry from the serving parcel table).

crs=2056 returns LV95 metre coordinates (2 decimals) instead of WGS84 (7 decimals). max_features defaults to 1000 (hard cap 2000); capped tells you when the area held more.

Measured on production: 150 m radius in central Zürich → 22 buildings in ~80 ms; 500 m → ~800 buildings in ~0.6 s. 10 s statement timeout → 504. Results are Redis-cached for 24 h (X-Cache: HIT|MISS) and served Cache-Control: private, max-age=3600 (token-gated, so never public).

Auth: token header, or ?token= on the GET so a URL can be pasted into a browser or a Grasshopper HTTP component. Errors are always JSON with a real status code (this is a new surface; no legacy plain-text mode).

GET
https://res.aireon.ch/res_api/building_footprints

Authorization

  • ResApiToken
    optional
    API key in header
  • ResApiTokenQuery
    optional
    API key in query

Query parameters

  • lat
    optional
    number

    WGS84 latitude of the search centre (with lng, radius_m).

  • lng
    optional
    number

    WGS84 longitude of the search centre.

  • radius_m
    optional
    number

    Search radius in metres (clamped to 500).

    maximum: 500 · minimum: 1 · default: 100
  • bbox
    optional
    string

    minLng,minLat,maxLng,maxLat in WGS84, at most ~1.5 km per side.

    pattern: ^-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+$
  • egrid
    optional
    string

    Parcel EGRID; returns the buildings on that parcel.

    pattern: ^CH[0-9]{12}$
  • crs
    optional
    4326
    or
    2056

    Output coordinate system: 4326 (WGS84 degrees) or 2056 (LV95 metres).

    default: 4326
  • max_features
    optional
    integer
    maximum: 2000 · minimum: 1 · default: 1000
  • token
    optional
    string

    RES API token as a query parameter (alternative to the token header).

Returns

200

Footprints in the requested area.

JSON
  • type
    string
    required
  • features
    array of
    object
    required
    • type
      string
      required
    • id
      integer
      required

      res_building_id - the suite-wide stable building key (also the feature id in the bo_buildings_vol vector tiles).

    • geometry
      object
      required

      A GeoJSON geometry object (Polygon or MultiPolygon here).

      • type
        Polygon
        or
        MultiPolygon
        or
        Point
        or
        LineString
        or
        MultiLineString
        or
        MultiPoint
        +1 more
        required
      • coordinates
        array of
        unknown
        required
    • properties
      object
      required
      • res_building_id
        optional
        integer
      • egid
        optional
        integer | null

        Federal building identifier (GWR EGID).

      • objid
        optional
        string | null

        Cadastral (AV) object id - not unique.

      • address
        optional
        string | null
      • zip
        optional
        integer | null
      • city
        optional
        string | null
      • canton
        optional
        string | null
      • foot_area_m2
        optional
        number | null

        Footprint area in m² (computed in LV95).

      • vol_m3
        optional
        number | null

        Building volume in m³ from the integrated cascade.

      • vol_src
        optional
        roofer_lod22
        or
        footprint_prism
        or
        gwr_gvol
        or
        gwr_floors_prism
        or
        flat_prism
        or
        none
        +1 more

        Which estimator produced vol_m3 (roofer LoD2.2 solid → footprint prism from measured height → GWR volume → GWR floors × 3 m → flat 3 m prism).

      • height_m
        optional
        number | null

        Building height in metres: roof 70th percentile minus ground for roofer buildings, otherwise the height the volume estimator used.

      • h_ground_masl
        optional
        number | null

        Ground elevation at the footprint, m a.s.l. (roofer only).

      • h_roof_70p_masl
        optional
        number | null

        Roof elevation, 70th percentile of LiDAR roof points, m a.s.l. (roofer only).

      • h_roof_max_masl
        optional
        number | null
      • h_roof_min_masl
        optional
        number | null
      • h_ridge_masl
        optional
        number | null
      • roof_type
        optional
        string | null

        slanted | horizontal | unknown (roofer classification).

      • roof_planes
        optional
        integer | null
      • rf_state
        optional
        ok
        or
        novol
        or
        norecon
        or
        null

        Roofer status: ok = LoD2.2 solid available; novol = reconstructed without a valid volume; norecon = not reconstructed.

      • pc_vintage
        optional
        integer | null

        swissSURFACE3D point-cloud vintage year used by the roofer.

      • floors
        optional
        integer | null

        GWR floor count.

      • year
        optional
        integer | null

        GWR construction year.

      • gstat
        optional
        integer | null

        GWR building status code (1004 = existing).

  • numberReturned
    integer
    required
  • capped
    boolean
    required

    True when more buildings matched than max_features; narrow the area or tile the request. Capped answers are not cached.

  • crs
    object
    required

    GeoJSON named CRS: urn:ogc:def:crs:EPSG::4326 (default) or urn:ogc:def:crs:EPSG::2056 when crs=2056 was requested.

    • type
      optional
      string
    • properties
      optional
      object
      • name
        optional
        string
  • query
    object
    required

    The normalised filter that was applied (mode point|bbox|egrid with its parameters).

  • source
    object
    required
    • table
      optional
      string
    • roofer_table
      optional
      string
    • vol_src_counts
      optional
      map of
      integer
    • height_definition
      optional
      string
  • timeStamp
    optional
    string
    format: date-time

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.

500

Server error.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

504

The PostGIS query exceeded the 10 s statement timeout - narrow the area.
JSON
  • error
    optional
    string
  • detail
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close