OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
route_planning.route_geojson_mapper Namespace Reference

Convert route-planning types to GeoJSON. More...

Functions

dict[str, Any] route_to_geojson (RouteResult route)
 Convert a calculated route to a GeoJSON feature.

Detailed Description

Convert route-planning types to GeoJSON.

Function Documentation

◆ route_to_geojson()

dict[str, Any] route_planning.route_geojson_mapper.route_to_geojson ( RouteResult route)

Convert a calculated route to a GeoJSON feature.

Parameters
routeRoute whose decoded shape should become a LineString.
Returns
GeoJSON Feature containing the route geometry and summary.