Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
sum edge distances when simplifying
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlincoln committed Apr 15, 2019
1 parent 33098a8 commit a8a3f48
Show file tree
Hide file tree
Showing 2 changed files with 22,454 additions and 22,454 deletions.
2 changes: 1 addition & 1 deletion osmar/drake.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pgh_plan <- drake_plan(
as_tbl_graph() %>%
activate(edges) %>%
left_join(select(write_edgelist(pgh_tidy_graph), -from, -to, -distance), by = "id"),
simplified_graph = simplify_topology(flat_graph, protected_nodes = which(vertex_attr(flat_graph, "pathfinder.interface"))),
simplified_graph = simplify_topology(flat_graph, protected_nodes = which(vertex_attr(flat_graph, "pathfinder.interface")), edge_attr_comb = list(pathfinder.distance = sum, .default.combiner = first)),
simplified_pgh_nodes = as_tbl_graph(simplified_graph) %>%
write_nodelist() %>%
write_csv(path = file_out("osmar/output_data/simplified/simplified_pgh_nodes.csv"), na = ""),
Expand Down
Loading

0 comments on commit a8a3f48

Please sign in to comment.