Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding label to added properties so arrow type feature will has a label #108

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mapmaker/routing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,7 @@ def set_properties_from_feature_id(feature_id: str):
feature.pop_property('exclude')

route_graph.graph['path-id'] = path.id
route_graph.graph['label'] = path.label
route_graph.graph['path-type'] = path.path_type
route_graph.graph['source'] = path.source
route_graph.graph['traced'] = path.trace
Expand Down
5 changes: 4 additions & 1 deletion mapmaker/routing/routedpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,10 @@ def draw_line(node_0, node_1, added_properties, tolerance=0.1, separation=2000):
for node_0, node_1, edge_dict in self.__graph.edges(data=True): ## This assumes node_1 is the terminal...
path_id = edge_dict.get('path-id')
path_source = edge_dict.get('source')
added_properties = {'completeness': edge_dict.get('completeness', True)}
added_properties = {
'completeness': edge_dict.get('completeness', True),
'label': self.__graph.graph.get('label')
}
if (missing_nodes:=edge_dict.get('missing_nodes')) is not None:
added_properties['missing-nodes'] = missing_nodes
if (alert:=self.__graph.graph.get('alert')) is not None:
Expand Down
Loading