Pitch Coordinates
Understanding the coordinate system used in AIB Insight.
Coordinate System
The pitch uses a standard coordinate system with the origin at the bottom-left corner:
- Origin (0, 0): Bottom-left corner
- X-axis: 0 to 105 meters (left to right)
- Y-axis: 0 to 68 meters (bottom to top)
X = 0m X = 52.5m X = 105m
┌─────────────────────────┬─────────────────────────┐ Y = 68m
│ │ │
│ ┌───┐ │ ┌───┐ │
│ │ │ │ │ │ │
│ │ G │ LEFT │ RIGHT │ G │ │
│ │ │ HALF │ HALF │ │ │
│ └───┘ │ └───┘ │
│ │ │
└─────────────────────────┴─────────────────────────┘ Y = 0m
Units
| Context | Unit | Conversion |
|---|---|---|
| API filters | Meters | Direct use |
| Tracking data | Centimeters | Divide by 100 |
Example Conversion
# Tracking data in centimeters
x_cm = 5250
y_cm = 3400
# Convert to meters
x_m = x_cm / 100 # = 52.5m (center of pitch)
y_m = y_cm / 100 # = 34m (center of pitch)
Key Pitch Dimensions
| Feature | X Range | Y Range | Notes |
|---|---|---|---|
| Full pitch | 0-105 | 0-68 | Standard dimensions |
| Left half | 0-52.5 | 0-68 | |
| Right half | 52.5-105 | 0-68 | |
| Left third | 0-35 | 0-68 | Defensive/attacking zone |
| Middle third | 35-70 | 0-68 | Midfield |
| Right third | 70-105 | 0-68 | Attacking/defensive zone |
Penalty Areas
| Area | X Range | Y Range |
|---|---|---|
| Left penalty area | 0-16.5 | 13.85-54.15 |
| Right penalty area | 88.5-105 | 13.85-54.15 |
| Left 6-yard box | 0-5.5 | 24.85-43.15 |
| Right 6-yard box | 99.5-105 | 24.85-43.15 |
Goals
| Goal | X Position | Y Range |
|---|---|---|
| Left goal | 0 | 30.34-37.66 |
| Right goal | 105 | 30.34-37.66 |
Team Orientation
At the start of the match:
- Team 0: Defends the left goal (attacks right)
- Team 1: Defends the right goal (attacks left)
Half-time Switch
Teams typically switch sides at half-time. The team_side_perspective filter parameter can help adjust queries automatically.
Using Coordinates in Filters
Define a zone
{
"type": "ball_location",
"x_min": 70,
"x_max": 105,
"y_min": 0,
"y_max": 68
}
Team perspective
Automatically adjust for team's attacking direction:
{
"type": "ball_location",
"x_min": 70,
"x_max": 105,
"team_side_perspective": "team_0"
}
This finds ball in Team 0's attacking third regardless of which half of the game.
Common Zone Definitions
ZONES = {
'left_third': {'x_min': 0, 'x_max': 35, 'y_min': 0, 'y_max': 68},
'middle_third': {'x_min': 35, 'x_max': 70, 'y_min': 0, 'y_max': 68},
'right_third': {'x_min': 70, 'x_max': 105, 'y_min': 0, 'y_max': 68},
'left_penalty_area': {'x_min': 0, 'x_max': 16.5, 'y_min': 13.85, 'y_max': 54.15},
'right_penalty_area': {'x_min': 88.5, 'x_max': 105, 'y_min': 13.85, 'y_max': 54.15},
'left_wing': {'x_min': 0, 'x_max': 105, 'y_min': 0, 'y_max': 15},
'right_wing': {'x_min': 0, 'x_max': 105, 'y_min': 53, 'y_max': 68},
'center': {'x_min': 35, 'x_max': 70, 'y_min': 20, 'y_max': 48},
}