mapmaker.routing.routedpath module

File doc…

class mapmaker.routing.routedpath.PathRouter[source]

Bases: object

add_path(path_id: str, route_graph: Graph)[source]
layout() dict[int, mapmaker.routing.routedpath.RoutedPath][source]
mapmaker.routing.routedpath.bezier_control_points(bezier, label='')[source]

Draw cubic Bezier control points and tangents.

Parameters:
  • bezier – A CubicBezier

  • label – A label for the middle control points

Returns:

A list of GeometricShapes

mapmaker.routing.routedpath.extend_geometry_by_join(geometry, node, node_dict, edge_dict_0, edge_dict_1)[source]

Smoothly join two edges of a route at a node.

mapmaker.routing.routedpath.smooth_join(e0, a0, a1, e1)[source]
class mapmaker.routing.routedpath.IntermediateNode(geometry, start_angle, end_angle)[source]

Bases: object

geometry(path_source, path_id, start_point, end_point, num_points=100, offset=0, show_controls=False)[source]
class mapmaker.routing.routedpath.RoutedPath(path_id: str, route_graph: Graph, number: int)[source]

Bases: object

property nerve_feature_ids: set[str]
property node_feature_ids: set[str]
property path_id
path_geometry() dict[str, list[mapmaker.geometry.shapes.GeometricShape]][source]
Returns:

A list of geometric objects. This are LineStrings describing paths between nodes and possibly additional features (e.g. way markers) of the paths.