Skip to content

lanestyle

Lane-level road maps for Python: every road as wide as its lanes, with its bus and bike lanes, lane lines, turn arrows, zebra crossings and sidewalks. One offline HTML page.

A lanestyle map of Monaco: Avenue Princesse Grace with its bike lane in blue, turn arrows before the junction, lane lines and zebra crossings

pip install lanestyle "duckosm[levels]"
import lanestyle as ls

ls.lane_page("monaco.levels", "monaco_gmns.duckdb", "monaco.duckdb").save("lanes.html")

lanestyle draws nothing of its own. roadstyle draws every road: one line as wide as its lanes, with its outline, bridges over and tunnels under, street names, hover and click, exactly as roadstyle's level editor draws it. lanestyle reads the lanes that duckOSM exports (GMNS, with the turns from SUMO) and puts them on those roads, so a road you fix in the editor is fixed on the page too.

What you can do

  • Map an area


    Three duckOSM commands and one call, from an OpenStreetMap extract to the page.

    Get started

  • Lanes and markings


    Bus and bike lanes, dashed and solid lane lines, turn arrows, BUS and bike marks, in metres.

    Lanes and markings

  • Junctions, zebras, sidewalks


    Lanes stop where a junction begins; painted crossings and tagged sidewalks, nothing guessed.

    Junctions, zebras and sidewalks

  • Fix the drawing


    Which road is over which, and how its ends look: roadstyle's level editor, with your lanes on it.

    The editor

  • Settings


    Colours, widths, dashes, marks: one lanestyle.json.

    Settings

  • See it live


    Monaco, lane by lane, full screen in your browser.

    Live map

The family

draws from
roadstyle a road network, one line per edge any edges GeoDataFrame
mapstyle a whole base map with the roads a duckOSM database
lanestyle the lanes and markings on every road a duckOSM database, its GMNS lanes and level area

All three save one HTML page that works offline and speaks the same rs* JavaScript API.