roadstyle
v0.30.0Styled, interactive road maps of any place (OpenStreetMap) or road file, with PNG previews.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
render_place
Download the OpenStreetMap road network of a place and draw it as an interactive HTML map. place: any name OpenStreetMap's geocoder knows, e.g. "Södermalm, Stockholm" or "Tartu, Estonia". Keep it to a district or a city: a county takes minutes to download. network_type: "drive", "walk", "bike", "all", "drive_service" or "all_public". options: render_edges keywords, e.g. {"color_by": "maxspeed", "legend": true}. output_path: where to save the .html (default ~/roadstyle-maps/<place>.html). Returns the saved path, a summary and a PNG preview.
| Parameter | Type | Description |
|---|---|---|
place * | string | |
network_type | string | |
options | ||
output_path |
render_file
Draw the road edges in a file (GeoPackage, GeoJSON, Shapefile, ...) as an interactive HTML map. The file needs line geometry (any CRS) and a road-class column, "highway" by default (another name: options={"highway_col": "..."}). options: render_edges keywords, e.g. {"color_by": "speed", "cmap": "viridis", "legend": true}. output_path: where to save the .html (default ~/roadstyle-maps/<file name>.html). Returns the saved path, a summary and a PNG preview.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
options | ||
output_path |
snapshot
PNG of a saved roadstyle map, optionally with a camera (centre lon/lat, zoom 0-22). Street names: main roads from zoom 15-16, side streets from 17; one-way arrows: main roads from 15, side streets from 17. Without a camera the map's own opening view is captured.
| Parameter | Type | Description |
|---|---|---|
html_path * | string | |
bearing | ||
lat | ||
lon | ||
pitch | ||
zoom |