Skip to content
Navigation

Spare-space candidates inside a bounding box (GeoJSON)

Returns the spare-space (buildable reserve) candidate polygons from the spare_space table that intersect a WGS84 bounding box, restricted to the currently ACTIVE snapshot (spare_space_snapshots.status = 'active'). At most 5,000 features per call, in table order - narrow the bbox rather than paging; there is no offset.

⚠ The usage audit listed egrid as a parameter: the code has no such filter. The only inputs are bbox (required) and canton (optional).

No authentication, no cache headers, not Redis-cached (v1 layer; the refresh/build POSTs from the runbook are not implemented).

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

Query parameters

  • bbox
    string
    required

    minLng,minLat,maxLng,maxLat in WGS84. Exactly four numbers or the call is a 400.

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

    Two-letter canton code; exact match on spare_space.canton. Not normalised (send uppercase).

    pattern: ^[A-Z]{2}$

Returns

200

FeatureCollection of candidate polygons (empty when nothing intersects or no snapshot is active).

JSON
  • type
    string
    required
  • features
    array of
    object
    required
    • type
      optional
      string
    • geometry
      optional
      object

      GeoJSON geometry of the candidate (geom_4326), WGS84.

    • properties
      optional
      object
      • id
        optional
        integer
      • kind
        optional
        string

        Candidate kind as stored in spare_space.kind.

      • egrid
        optional
        string | null

        EGRID of the host parcel (egrid_a).

      • canton
        optional
        string | null
      • confidence
        optional
        number | null
      • area_m2
        optional
        integer

        Rounded to whole m².

      • inscribed_diam_m
        optional
        number | null

        Largest inscribed circle diameter, rounded to 0.1 m.

      • az_surplus_m2
        optional
        integer | null

        Remaining floor-area allowance (Ausnützungsziffer surplus), rounded to whole m².

400

bbox missing or malformed - {"error":"bbox=minLng,minLat,maxLng,maxLat required"}.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

500

Query failed - {"error":"query failed"}.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

Type to search…

↑↓ navigate↵ selectEsc close