# opentraffic/otv2-platform architecture

> Architecture diagram of the GitHub repository opentraffic/otv2-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/opentraffic/otv2-platform
- Repository: https://github.com/opentraffic/otv2-platform

## Overview

Open Traffic v2 is a platform for turning contributed vehicle and smartphone location data into privacy-filtered traffic statistics, then serving historical analysis and traffic-aware routing. Its principal workflow runs from probe ingestion through trajectory matching and privacy pooling to centralized storage and public extracts. The README also documents basemap generation, analyst queries, and stand-alone traffic maps. The repository contains only the README and images; relationships below follow the documented architecture, not inspected implementation code.

Main entry points: [`README.md`](https://github.com/opentraffic/otv2-platform/blob/master/README.md) (Public data extracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_basemap["Basemap generation"]
  node_basemap_generator["Basemap Generator<br/>[README.md]"]
  node_osmlr["OSMLR segments<br/>[README.md]"]
  node_routing_tiles["Valhalla graph tiles<br/>[README.md]"]
end

subgraph group_reporter["Probe reporting"]
  node_reporter["Reporter<br/>[README.md]"]
  node_point_format["Point formatting<br/>[README.md]"]
  node_moving_window["Trajectory window<br/>[README.md]"]
  node_map_matching["Map matching<br/>[README.md]"]
  node_privacy_pool["Privacy pooling<br/>[README.md]"]
end

subgraph group_datastore["Traffic datastore"]
  node_datastore["Datastore<br/>[README.md]"]
  node_histograms[("Histogram tiles<br/>[README.md]")]
  node_public_extracts["Public data extracts<br/>[README.md]"]
end

subgraph group_consumption["Data consumers"]
  node_analyst_ui["Analyst UI<br/>[README.md]"]
  node_routing_engine["Valhalla routing<br/>[README.md]"]
  node_standalone_maps["Stand-alone maps<br/>[README.md]"]
end

node_osm(("OpenStreetMap"))
node_probe_org(("Probe providers"))
node_analyst(("Analysts"))
node_map_users(("Map users"))

node_osm -->|"provides map data"| node_basemap_generator
node_basemap_generator -->|"generates segments"| node_osmlr
node_basemap_generator -->|"builds graph tiles"| node_routing_tiles
node_osmlr -->|"associates segments"| node_routing_tiles
node_probe_org -->|"provides GPS points"| node_reporter
node_reporter -->|"processes points"| node_point_format
node_point_format -->|"collects points"| node_moving_window
node_moving_window -->|"matches trajectory"| node_map_matching
node_routing_tiles -->|"supports matching"| node_map_matching
node_map_matching -->|"matches segments"| node_osmlr
node_map_matching -->|"pools matches"| node_privacy_pool
node_privacy_pool -->|"sends statistics"| node_datastore
node_datastore -->|"stores statistics"| node_histograms
node_histograms -->|"produces extracts"| node_public_extracts
node_public_extracts -->|"supplies query data"| node_analyst_ui
node_analyst -->|"queries data"| node_analyst_ui
node_public_extracts -->|"provides traffic data"| node_routing_engine
node_routing_tiles -->|"provides road graph"| node_routing_engine
node_public_extracts -.->|"provides map data"| node_standalone_maps
node_map_users -.->|"views maps"| node_standalone_maps

click node_basemap_generator "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_osmlr "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_routing_tiles "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_reporter "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_point_format "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_moving_window "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_map_matching "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_privacy_pool "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_datastore "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_histograms "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_public_extracts "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_analyst_ui "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_routing_engine "https://github.com/opentraffic/otv2-platform/blob/master/README.md"
click node_standalone_maps "https://github.com/opentraffic/otv2-platform/blob/master/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_basemap_generator,node_osmlr,node_routing_tiles,node_map_users toneBlue
class node_reporter,node_point_format,node_moving_window,node_map_matching,node_privacy_pool toneAmber
class node_datastore,node_histograms,node_public_extracts toneMint
class node_analyst_ui,node_routing_engine,node_standalone_maps toneRose
class node_osm,node_probe_org,node_analyst toneIndigo
```

## Components

### Basemap generation

- [Basemap Generator](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [OSMLR segments](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Valhalla graph tiles](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`

### Probe reporting

- [Reporter](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Point formatting](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Trajectory window](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Map matching](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Privacy pooling](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`

### Traffic datastore

- [Datastore](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Histogram tiles](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Public data extracts](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`

### Data consumers

- [Analyst UI](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Valhalla routing](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`
- [Stand-alone maps](https://github.com/opentraffic/otv2-platform/blob/master/README.md): `README.md`

### Other components

- **OpenStreetMap**
- **Probe providers**
- **Analysts**
- **Map users**

## Connections

- OpenStreetMap → Basemap Generator: provides map data
- Basemap Generator → OSMLR segments: generates segments
- Basemap Generator → Valhalla graph tiles: builds graph tiles
- OSMLR segments → Valhalla graph tiles: associates segments
- Probe providers → Reporter: provides GPS points
- Reporter → Point formatting: processes points
- Point formatting → Trajectory window: collects points
- Trajectory window → Map matching: matches trajectory
- Valhalla graph tiles → Map matching: supports matching
- Map matching → OSMLR segments: matches segments
- Map matching → Privacy pooling: pools matches
- Privacy pooling → Datastore: sends statistics
- Datastore → Histogram tiles: stores statistics
- Histogram tiles → Public data extracts: produces extracts
- Public data extracts → Analyst UI: supplies query data
- Analysts → Analyst UI: queries data
- Public data extracts → Valhalla routing: provides traffic data
- Valhalla graph tiles → Valhalla routing: provides road graph
- Public data extracts → Stand-alone maps: provides map data
- Map users → Stand-alone maps: views maps
