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.

GPS Limitations
Accuracy: ±3–5 meters in urban environments
Parallel Roads: GPS points may snap to the wrong street
Complex Intersections: Multiple possible paths for a single GPS point

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.

Mapbox Matching API
ParameterDetails
ProfileMapbox/walking (wheelchair-appropriate)
Radius25 m tolerance for GPS drift
Success rate85–95% of points matched
OSM Way Fetching
ParameterDetails
APIOverpass API for highway ways
FilterAll highway types except motorways/trunks
GeometryFull node coordinates for precision
Corridor Clipping
ParameterDetails
ProblemGPS matching to adjacent streets
Solution18 m buffer corridor around rider path
EffectRemoves parallel ways >18 m from actual route
Spatial Assignment
ParameterDetails
MethodSTRtree spatial index
Tolerance25 m maximum distance for point-to-way assignment
Coverage80–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.

Validation Workflow
Visual Inspection
Overlay GPS tracks on OSM map
Distance Checks
Ensure reasonable point-to-way distances
Route Continuity
Verify logical path through network

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.

Accuracy Results
Urban Areas: 90–95% correct assignment
Suburban Areas: 85–90% correct assignment
Complex Intersections: 75–80% correct assignment

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.

Coverage Formula
matched_distance = "sum of distances between consecutive assigned points on same way"
way_length = "total length of OSM way geometry"
coverage = matched_distance / way_length

Example

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.

Tagging Steps
Add Nodes
Place nodes at the start and end of the rough section
Split Way
Divide the original street segment at the new nodes
Tag Segment
Assign a different smoothness=* value to the middle portion

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.