bikelts

Bicycle Level of Traffic Stress (LTS 1-4) from OpenStreetMap or tables: Mekuria 2012, Furth 2017 and Bike Ottawa rules, assumption logging and low-stress network connectivity.

Version 0.1.2 · Python >=3.9 · MIT licence
pip install bikelts
PyPISourceIssuesChangelogCite (DOI)

bikelts

PyPI Python versions Pipeline License: MIT DOI Downloads

bikelts computes bicycle Level of Traffic Stress (LTS 1-4) for street segments and intersections from OpenStreetMap tags or your own tabular attributes, records why each segment got its score and which inputs were assumed, and analyses the connectivity of the resulting low-stress network.

It is written for active-transportation planners and researchers who need a transparent, reproducible LTS map rather than a black box.

Installation

pip install bikelts              # core, no dependencies
pip install "bikelts[geo]"       # + geopandas/shapely (to_geodataframe)
pip install "bikelts[graph]"     # + networkx (to_networkx)
pip install "bikelts[all]"

Python 3.9 or newer.

Quick start

Command line

# Optional: fetch highways for a bounding box (south west north east) from Overpass
bikelts download --bbox 41.000 29.000 41.010 29.015 -o area.json --timeout 60

# Classify (OSM XML .osm, Overpass .json or GeoJSON) and write GeoJSON with LTS + reasons
bikelts classify area.osm -o lts.geojson --method furth2017 --country DE --intersections

# Low-stress islands, LTS shares and OD reachability
bikelts islands lts.geojson --max-lts 2 -o islands.geojson
bikelts stats lts.geojson --max-lts 2
bikelts reach lts.geojson --max-lts 2 --pairs 500 --max-detour 1.25

# Tabular input: CSV in, CSV out (columns listed below)
bikelts classify segments.csv -o segments_lts.csv --method mekuria2012

bikelts methods      # list rulesets with their sources

Every analysis command accepts --json for machine-readable output.

Python

from bikelts import LTSParameters, classify_tags

params = LTSParameters(country="DE")
r = classify_tags(
    {"highway": "secondary", "maxspeed": "50", "cycleway:right": "lane", "parking:right": "lane"},
    method="furth2017",
    params=params,
)
r.lts_forward, r.lts_backward       # (2, 3)
r.reasons
# ['forward: bike lane alongside parking: 1 lane per direction, reach 12-14 ft (reach 13 ft), 30 mph -> LTS 2',
#  'backward: mixed traffic, 1 thru lane per direction, ADT 3000+, 30 mph -> LTS 3']
r.assumptions
# ['ADT missing -> assumed 9000 veh/day from highway=secondary default',
#  'lanes missing -> assumed 2 from highway=secondary two-way default', ...]

A whole extract and its network:

from bikelts import (LTSNetwork, LTSParameters, classify_osm, connectivity_metrics,
                     detect_crossings, low_stress_islands, od_reachability,
                     random_od_pairs, read_osm, to_geojson, write_geojson)

params = LTSParameters(country="DE")
data = read_osm("area.osm")                       # .osm, Overpass .json or .geojson
ways = classify_osm(data, "furth2017", params)
crossings = detect_crossings(data, ways, params)
write_geojson("lts.geojson", to_geojson(ways, crossings, data))

net = LTSNetwork.from_classified(ways, crossings)
islands = low_stress_islands(net, max_lts=2)
metrics = connectivity_metrics(net, max_lts=2)
results, summary = od_reachability(net, random_od_pairs(net, 500, seed=1), max_lts=2)
summary["low_stress_connected_share"]           # share of OD pairs connected at LTS <= 2

Tabular records (dicts or CSV rows) use classify_record / classify_records. See examples/ for a runnable script, a synthetic OSM extract and a sample CSV.

Rulesets

Select with method= (Python) or --method (CLI).

mekuria2012 furth2017 (default) bikeottawa
Source Mekuria, Furth & Nixon (2012), MTI Report 11-19 Furth (2017), LTS Criteria for Road Segments v2.0 Bike Ottawa stressmodel.js v1.0.1
Mixed traffic total lanes (2-3 / 4-5 / 6+) x speed (<=25 / 30 / 35+ mph); lower value when no centreline and ADT <= 3000 thru lanes per direction (unlaned / 1 / 2 / 3+) x ADT x speed (<=20 ... 50+ mph); effective ADT = 1.5 x ADT on one-way roads maxspeed (km/h), total lanes, highway=residential, service types
Bike lane, no parking weakest link over lanes/median, width (6 ft), speed, blockage lanes x width (6+ / 4-5 ft) x speed; < 4 ft does not qualify lanes, explicit width, speed, residential
Bike lane with parking weakest link over lanes, reach (15 / 14 / 13.5 ft), speed, blockage lanes x reach (15+ / 12-14 ft) x speed (<= 35 mph); reach < 12 ft does not qualify lanes, explicit width, speed, residential
Separated paths, cycle tracks LTS 1 LTS 1 LTS 1 (also highway=footway)
Blocked lanes blockage row (LTS 3) rated as mixed traffic not used
ADT, centreline ADT <= 3000 + no centreline footnote central not used
Direction per direction per direction one score per way
Intersections Table 5 and 6 (below) Table 5 and 6 (below) Table 6 if requested

Table numbers for the 2012 criteria follow Furth's republished LTS Criteria Tables: Table 1 segments by bikeway type, Table 2 bike lanes alongside a parking lane, Table 3 bike lanes not alongside a parking lane, Table 4 mixed traffic, Table 5 intersection approaches with a right-turn lane, Table 6a/6b unsignalized crossings without/with a crossing island. The 2017 v2.0 document has three unnumbered tables (mixed traffic; bike lanes and shoulders not adjacent to a parking lane; bike lanes alongside a parking lane). The test suite checks every cell of all of these tables.

Intersections

In network analysis, a crossing with LTS above the cap blocks movements between two non-dominant approaches (going straight across), while turning onto the dominant street is governed by that street's own segment LTS.

Inputs, defaults and assumptions

OSM tags understood

Topic Tags
Access highway, bicycle (no, use_sidepath, dismount close the way), access, vehicle, motor_vehicle
Direction oneway (yes/-1/reversible), oneway:bicycle, junction=roundabout, cycleway=opposite*, cycleway:<side>:oneway
Bikeways cycleway, cycleway:left/right/both = lane, track, shared_lane, share_busway, opposite_lane, opposite_track, opposite, separate, no; subkeys :lane (advisory, pictogram), :width, :buffer, :separation (kerb, bollard, flex_post... make a lane a protected lane), sidewalk[:side]:bicycle=designated, shoulder[:side] + shoulder:access:bicycle
Speed maxspeed (50, 30 mph, DE:urban, FR:zone30, GB:nsl_single, none, walk), maxspeed:forward/backward, zone:maxspeed, source:maxspeed, bicycle_road/cyclestreet
Lanes lanes, lanes:forward/backward, lanes:bus/psv (excluded), lane_markings, dual_carriageway
Parking new scheme parking:<side>=lane/street_side/on_kerb/half_on_kerb/no/separate, old scheme parking:lane:<side>=parallel/diagonal/perpendicular/no_parking/no_stopping, parking:<side>:width
Other surface (paved / cobbled / unpaved classes), adt/aadt if you add counts

Sides are mapped to travel directions using the driving side of the country (left-hand traffic for GB, IE, JP, AU, NZ, IN, ZA and others).

Defaults (all logged when used)

Missing input Default
maxspeed national urban/rural/motorway/living-street limit for 35 countries (LTSParameters(country=..., context=...)), generic 50/90/120 km/h otherwise; service/track capped at 30 km/h
lanes by class: trunk 4, primary...residential 2 (one-way: half)
centreline none on residential, living_street, service, track; marked elsewhere
ADT planning-level guess by class: residential 600, unclassified 1500, tertiary 4000, secondary 9000, primary 15000, trunk 25000 veh/day (adt_overrides to change)
bike lane width 1.5 m (about 5 ft); buffer yes = 0.5 m; shoulder 1.2 m
parking next to a bike lane absent (assume_parking=True to flip); parking lane 2.4 m
blockage rare (default_blockage="frequent")
speed columns metric speeds are rounded to the nearest 5 mph before the mph tables (50 km/h -> 30 mph); speed_binning="exact" disables this
widths rounded to the nearest 0.5 ft before the ft tables

Tabular columns

id, highway, facility (mixed | bike_lane | shoulder | separated | no_motor_traffic), speed_mph or speed_kmh, lanes or lanes_per_direction, oneway, contraflow, centerline, adt, median, residential, blockage (rare | frequent), bike_lane_width_ft|_m, buffer_ft|_m, parking, parking_width_ft|_m, reach_ft|_m, rt_lane_config, permitted, surface. All optional; missing values are assumed and logged.

Network analysis

Limitations

References

If you use bikelts in research, please cite the method papers above and this software (see CITATION.cff).

Development

pip install -e ".[dev]"
pytest --cov=bikelts
ruff check . && ruff format --check src tests && mypy src

Related Geophilo SDKs

All packages: Geophilo SDK dashboard.

License

MIT, see LICENSE. OSM data is (c) OpenStreetMap contributors under the ODbL; the sample extract in examples/ is synthetic.

Academic citation

@software{eminoglu_bikelts_2026,
  author  = {Eminoğlu, Yusuf},
  title   = {bikelts: Bicycle Level of Traffic Stress for Python},
  year    = {2026},
  version = {0.1.2},
  doi     = {10.5281/zenodo.24065192},
  url     = {https://doi.org/10.5281/zenodo.24065192}
}

See also CITATION.cff.

Other Geophilo SDKs