Route#
- class Route#
Represents a route
- route#
List of all routepoints that comprise a route
- Type
list[Routepoint]
- name#
An optional name for the route
- Type
Optional[str]
- description#
An optional description for the route
- Type
Optional[str]
- set(route)#
Set the route
- Parameters
route (list[Routepoint]) – The route to set
- reset()#
Reset the route
- add_routepoint(routepoint)#
Add a routepoint to the end of the route
- Parameters
routepoint (Routepoint) – The routepoint to add
- remove_routepoint(routepoint)#
Remove a routepoint from the route and return it
- Parameters
routepoint (Routepoint) – The routepoint to remove
- Returns
The removed routepoint
- Return type
- get_edges()#
Get the edges between each route
- Returns
A list of the edges connecting the routepoints in the route
- Return type
List[Tuple[Routepoint, Routepoint]]
- edge_distances_m()#
Get the distance between each point in a route
- Returns
A list of the distances between each routepoint in a route in metres
- Return type
List[float]
- route_distance_m()#
Get the distance of the route in metres
- Returns
The overall distance of the route in metres
- Return type
float
- distance_to_end_m(routepoint)#
Get the distance to the end of the route in metres
- Parameters
routepoint (Routepoint) – The routepoint to compare
- Returns
The distance to the end of the route in metres
- Return type
float