> ## Documentation Index
> Fetch the complete documentation index at: https://offthepace.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# dim_corners

> One row per race × circuit turn: the telemetry distance window each corner owns, derived from FastF1's own corner table (stg_circuit_info) rather than maintained by hand.

<Note>Part of the [Reference](/transform/families/reference) family.</Note>

One row per race × circuit turn: the telemetry distance window each corner owns, derived from FastF1's own corner table (stg\_circuit\_info) rather than maintained by hand. Windows run from the apex minus corner\_entry\_margin\_m to the apex plus corner\_exit\_margin\_m, each end clipped at the neighbouring apex, so consecutive corners overlap only in the stretch between them   which is both the exit of one and the approach to the next. Keyed per race because FastF1 publishes geometry per event and venues re-profile mid-history; a race whose corner table is missing borrows the nearest season of the same event slug and says so in geometry\_source.

## Lineage

```mermaid theme={null}
flowchart LR
  dim_circuits --> dim_corners
  stg_circuit_info --> dim_corners
  stg_laps --> dim_corners
  dim_corners --> int_corner_metrics
  style dim_corners fill:#e40404,stroke:#e40404,color:#fff
```

## Overview

| Property          | Value                                                                                                          |
| ----------------- | -------------------------------------------------------------------------------------------------------------- |
| Layer             | `reference`                                                                                                    |
| Family            | [Reference](/transform/families/reference)                                                                     |
| Contract enforced | No                                                                                                             |
| Upstream          | [`stg_laps`](../stg/stg_laps), [`stg_circuit_info`](../stg/stg_circuit_info), [`dim_circuits`](./dim_circuits) |

**14 tests** [guard](/transform/ci/overview) this model  -  13 generic, 1 singular.

## Columns

| Column             | Type      | Nullable | Tests                                                                                       | Description                                                                                                                                                                                                                                                                                                                            |
| ------------------ | --------- | -------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `corner_key`       | `varchar` | Yes      | [`not_null`](/transform/ci/structural), [`unique`](/transform/ci/structural)                | PK, race\_id \|\| '\_' \|\| corner\_name.                                                                                                                                                                                                                                                                                              |
| `race_year`        | `integer` | Yes      | [`not_null`](/transform/ci/structural)                                                      | Season year of the race the window applies to.                                                                                                                                                                                                                                                                                         |
| `race_id`          | `varchar` | Yes      | [`not_null`](/transform/ci/structural)                                                      | Numeric FastF1 event id, the join key into stg\_telemetry.                                                                                                                                                                                                                                                                             |
| `track_id`         | `varchar` | Yes      | [`not_null`](/transform/ci/structural)                                                      | Event slug for the race (bahrain\_grand\_prix). Carried through int\_corner\_metrics as a label; nothing in this model pools across slugs.                                                                                                                                                                                             |
| `circuit_id`       | `varchar` | Yes      |                                                                                             | Physical-circuit identifier from dim\_circuits. Several event slugs can share one circuit\_id (renamed events, double-headers), so it is non-unique here.                                                                                                                                                                              |
| `corner_name`      | `varchar` | Yes      | [`not_null`](/transform/ci/structural)                                                      | Turn label, 'Turn\_' \|\| corner\_number \|\| corner\_letter (e.g. Turn\_7, Turn\_7A).                                                                                                                                                                                                                                                 |
| `corner_number`    | `integer` | Yes      | [`not_null`](/transform/ci/structural)                                                      | FastF1 corner number, ordered by distance along the lap.                                                                                                                                                                                                                                                                               |
| `corner_letter`    | `varchar` | Yes      |                                                                                             | Suffix FastF1 uses where one numbered turn has several apexes; NULL otherwise.                                                                                                                                                                                                                                                         |
| `apex_distance_m`  | `double`  | Yes      | [`not_null`](/transform/ci/structural)                                                      | Distance of the corner apex from the start line, on the same reference as stg\_telemetry.distance\_m. Validated against the measured speed minimum on slow corners (median offset 2 m).                                                                                                                                                |
| `start_distance_m` | `double`  | Yes      | [`not_null`](/transform/ci/structural)                                                      | Window start: apex − corner\_entry\_margin\_m, floored at the previous apex and at 0. Wide enough to contain the braking zone on corners with a clear approach.                                                                                                                                                                        |
| `end_distance_m`   | `double`  | Yes      | [`not_null`](/transform/ci/structural)                                                      | Window end: apex + corner\_exit\_margin\_m, capped at the next apex so a corner never reaches past its neighbour.                                                                                                                                                                                                                      |
| `geometry_race_id` | `varchar` | Yes      | [`not_null`](/transform/ci/structural)                                                      | Race whose FastF1 corner table produced this window (self, or the borrowed session).                                                                                                                                                                                                                                                   |
| `geometry_source`  | `varchar` | Yes      | [`not_null`](/transform/ci/structural), [`accepted_values`](/transform/ci/range-and-domain) | 'session' where the race has its own corner table, 'nearest\_season' where it borrows the closest season at the same event slug. 143 of 149 races carry their own geometry and four borrow; the two that cannot (2020 Sakhir and Tuscan, one-offs with no sibling event at the same slug) have no geometry anywhere and carry no rows. |
