check_clearance_on_route
Measure a vehicle's overhead clearance along a route against surveyed point cloud geometry, wherever survey coverage exists. Routes with truck costing (so the search already avoids the height restrictions the map has tagged), then measures that corridor. Give origin, destination and height_m; optional width_m asks the corridor-width axis too, and optional margin_m adds your operating margin to the vehicle before the verdict. Returns pass, fail, indeterminate or no_verdict with the limiting point, the measured headroom, its uncertainty bound (safe_headroom_m, sigma_m, sampling_gap_m) and a link to that exact view in the survey viewer. An indeterminate carries indeterminate_reasons as codes to branch on and the same reasons as English inside explanation; read out the English. A pass may carry no limiting point at all, which means the survey found nothing above that corridor, and the width axis may answer not_assessed where the corridor edges are too sparsely surveyed while the height axis still answers. Honesty, and it matters here: this measures physical geometry from a dated survey. It is not a signed or posted height, clearance_enforcement.route_certified is always false, and the caveat is on every answer including the clear one. Ground the survey did not cover comes back as not_surveyed_m and is never judged, so a pass is possible over complete coverage and nowhere else; sparse or stale coverage comes back separately as insufficient_data_m. Reach for this when a truck route came back unchanged and you need to know whether that means anything: an unchanged route avoids what the map records, which is a different claim from measured headroom, because a structure nobody tagged is routed through like open road. Needs the MapMap gateway (GATEWAY_URL + GATEWAY_API_KEY), which holds the surveys; there is no fallback, and it will not answer from the routing step alone. The mapmap://guide/clearance resource sets out what each answer proves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | Route origin. | |
| width_m | No | Vehicle width in metres. Supplying it asks the width axis as well as the height axis; the width answer is reported separately and is never a headroom. | |
| height_m | Yes | Vehicle height in metres. Required: there is no default vehicle, because a default vehicle is how somebody gets an answer about a lorry that is not theirs. | |
| margin_m | No | Operating margin in metres, added to the height before the verdict is decided (default 0). Your compliance policy, not ours: the measured figure and the safe bound are both reported whatever you set here, and the margin is echoed back. It is applied to the measurement, not to the routing step, where the map's own posted heights already carry a margin of their own. | |
| destination | Yes | Route destination. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| basis | Yes | Always `"surveyed_geometry_not_signage"`. | |
| width | Yes | The width axis, answered separately when `width_m` was given. | |
| verdict | Yes | `pass`, `fail`, `indeterminate` or `no_verdict` for the height axis. A `pass` is possible over completely surveyed ground and nowhere else: unsurveyed ground yields `no_verdict`, never a pass. | |
| datasets | Yes | The surveys drawn on, with their capture dates and staleness. | |
| limiting | No | The limiting point on a `fail`, the tightest point on a `pass`, the worst contested point on an `indeterminate`. Absent on a `no_verdict`, and absent on a `pass` where the survey found nothing at all above the corridor. | |
| view_url | No | Deep link to that exact view in the survey viewer, so the reading can be looked at rather than taken on trust. | |
| advisories | Yes | Notes on stretches of the route: vegetation age, a reading limited by a wire, a seam between surveys. | |
| assessed_m | Yes | Metres of route measured against survey data good enough to decide on. | |
| explanation | Yes | What was measured, when, with what bound, and what the tool declined to conclude. It may over-restrict; it never under-restricts. | |
| not_surveyed_m | Yes | Metres of route no survey covers. This is the absence of a measurement, and it is never the same statement as a measured open sky. No verdict is drawn over it. | |
| resolution_hint | No | What would resolve an `indeterminate`, in one sentence, as the measuring service phrased it. | |
| route_distance_m | Yes | Length of the route the vehicle was routed over, metres. | |
| route_duration_s | Yes | Estimated driving time for that route, seconds. | |
| geometry_polyline6 | Yes | The route as a six-digit-precision encoded polyline, so the same shape can be drawn or re-measured without routing again. | |
| insufficient_data_m | Yes | Metres of route a survey covers but too sparsely, or too stale, to decide on. Also an absence, and reported apart from `not_surveyed_m` because the two have different remedies. | |
| clearance_enforcement | Yes | What this answer does and does not prove. Read it. | |
| indeterminate_reasons | Yes | Why an `indeterminate` could not be called, as machine-readable codes (`inside_uncertainty_band`, `vegetation_age_exceeded`, `artefact_stale`, `artefact_freshness_unchecked`). Empty on every other verdict. These are for branching on, not for reading out: the same reasons appear as English in `explanation`, and a person shown `artefact_freshness_unchecked` has been failed by whatever displayed it. |