Data Linking
How to align GPS points with OSM street segments.
Overview
Assigning e-scooter telemetry to OpenStreetMap road segments requires handling GPS errors, parallel streets, and complex intersections while ensuring accurate representations of the urban network. The stages below describe how raw GPS traces become street-level assignments that OSM tooling can work with.
The Challenge
Mapping e-scooter telemetry to exact street segments is complex. GPS inaccuracies, urban density, and intricate intersections make precise alignment difficult, so the data has to be run through a matching pipeline first.
The pipeline addresses these limitations in four stages. Each stage narrows the uncertainty left by the previous one, from the initial API match through corridor clipping to the final point-to-way assignment.
| Parameter | Details |
|---|---|
| Profile | Mapbox/walking (wheelchair-appropriate) |
| Radius | 25 m tolerance for GPS drift |
| Success rate | 85–95% of points matched |
| Parameter | Details |
|---|---|
| API | Overpass API for highway ways |
| Filter | All highway types except motorways/trunks |
| Geometry | Full node coordinates for precision |
| Parameter | Details |
|---|---|
| Problem | GPS matching to adjacent streets |
| Solution | 18 m buffer corridor around rider path |
| Effect | Removes parallel ways >18 m from actual route |
| Parameter | Details |
|---|---|
| Method | STRtree spatial index |
| Tolerance | 25 m maximum distance for point-to-way assignment |
| Coverage | 80–90% of points successfully assigned |
Quality Assurance
To ensure the reliability of mapped segments, multiple validation layers are applied. Both automated checks and manual inspections verify that the telemetry aligns accurately with real-world streets before evaluating assignment accuracy.
Applied together, these checks keep wrong assignments rare. Accuracy still varies with the complexity of the street network, and the observed rates reflect that spread across urban, suburban, and intersection-heavy areas.
Aggregation and Coverage
Telemetry points are aggregated at the street level, so each street segment receives one representative accessibility tag that reflects overall conditions rather than isolated measurements.
OSM Structure
Streets are stored as "ways" (segments between intersections), and tags like smoothness=* apply to the entire way, not individual meters. OSM's data model doesn't support micro-tagging specific portions of a street.
Practical Usability
Navigation apps need to answer "Is this whole street wheelchair-accessible?" not "Meters 47-50 are smooth." Users planning routes need street-level assessments, not meter-by-meter details that would be impossible to display or navigate.
Statistical Aggregation
Multiple GPS points along a street segment are sampled to make a statistical judgment for the entire segment, based on the distribution of observed classifications. The judgment weighs how many samples fall into each class rather than trusting any single reading, so brief spikes do not overturn a consistent majority.
Coverage Requirement
Coverage is computed for every way. About 30% coverage is used when surfacing candidates for review or map display. Applying a proposal with the current tooling requires at least 70% coverage and 70% point agreement. Proposal generation follows the bad-run / agreement policy described below.
matched_distance = "sum of distances between consecutive assigned points on same way"
way_length = "total length of OSM way geometry"
coverage = matched_distance / way_lengthExample
Consider a 200 m street segment with no existing smoothness tag. If a rider samples 150 m of this segment (75% coverage) with 50 GPS readings, of which 45 indicate a good surface and 5 intermediate, then agree_pct is 100% (≥70%), so the system proposes smoothness=intermediate for the whole way. Proposals are limited to bad (longest contiguous bad/very_bad run ≥30 m) or intermediate (agree_pct ≥70%). Ways that already have a smoothness tag are skipped.
Limitations
This approach has trade-offs. Some portions of the street that were not sampled might differ slightly from the proposed tag. Short segments with poor surface conditions may be averaged out if they are shorter than 30 m. Contributors are encouraged to verify proposals using local knowledge, and manual refinement is recommended for more complex cases.
OSM's way-based tagging structure requires this approach. Review/map surfacing commonly uses a ~30% coverage bar; apply filters require at least 70% coverage and 70% point agreement.
Partial Street Tagging
OpenStreetMap does allow mappers to split a way and tag each resulting segment differently. A 200 m street with a rough 30 m section, for example, can be divided so that the rough stretch carries its own smoothness value.
Automatic Splitting
Automatically splitting streets into smaller segments is avoided because it leads to over-fragmentation, complicates reviews, makes consistent tagging difficult, and risks conflicts with standard OSM editing practices.
Adopted Approach
Instead, the adopted approach works at the existing way granularity. Way-level tags are applied using coverage thresholds and confidence scoring, ensuring reliable classifications, while fine-grained edits are left to human mappers where conditions change sharply along a segment.