CityofToronto / bdit_congestion

Determining most congested streets and days in Toronto
https://github.com/orgs/CityofToronto/teams/bigdatainnovationteam
GNU General Public License v3.0
0 stars 0 forks source link

Congestion Network 2: Create routing functions #60

Closed chmnata closed 1 year ago

chmnata commented 2 years ago

Creating routing functions for the network:

chmnata commented 2 years ago

congestion.get_segments_btwn_nodes(start_node, end_node) takes here_nodes as input so it will be the start_vid and end_vid in the table congestion.network_segments, there is a table with just nodes in congestion.network_nodes. It returns the start node, end node, array of segment ids, total length of the routed lines, and the unioned geometry of the routed result.

chmnata commented 1 year ago

added a ORDER BY path_seq when array_agg the segment_id as per @Nate-Wessel's suggestion for the function here_gis.routing_btwn_nodes. This allows the aggregated list of segment_id to be in order of the path.