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: Validate Network #67

Open chmnata opened 1 year ago

chmnata commented 1 year ago

Listed layers that needs to be validated and suggest validation methods.

Network Segments congestion.network_segments

Layer of the congestion network segments

Network Nodes congestion.network_nodes

Layer contains nodes that make up each network segment

Centreline int_id and HERE node matching network_int_px_22_2

Centreline segments congestion.centreline_segments

Layer contains sets of geo_ids that represents each segments.

Centreline segments congestion.centreline_segments_name

Layer contains sets of geo_ids that represents each segments + Street name

radumas commented 1 year ago

Might add identifying segments with low/no data and doing a little investigation per https://github.com/Toronto-Big-Data-Innovation-Team/rapidto/pull/38#issuecomment-1284227182

radumas commented 1 year ago

I think two of these tables are names wrong:

radumas commented 1 year ago

There are concerns that some meaningful segments of streets may be missing due to road classification.

Nate-Wessel commented 1 year ago

Issues found from manual validation of congestion.network_segments so far:

Nate-Wessel commented 1 year ago

Should I be looking at congestion.segments_v6 instead of congestion.network_segments? segments_v6 seems to correct some of the problems I described above.

Nate-Wessel commented 1 year ago

not all highways are marked highway

Capture

ShahrzadBorjian2 commented 1 year ago

I found a few issues with congestion.segment_centreline_lookup table. The table contains incorrect start_vidor/and end_vid for the segments that intersection names of their end points are missing (NULL) in gis.centreline_intersection table. It seems int_ids of the closets intersections with available intersections name have been assigned to these segments.

Please see the following example from the CafeTO project for more clarifications and details. I used the following sql to get intersection names of the segments within the study area (cafe_to.“TEST_st_clair_west") to create lookup table with intersection names. • Joined cafe_to.“TEST_st_clair_west" table and congestion.segment_centreline_lookupusing segment_id to get start_int and end_int ids • Then joined gis.centreline_intersectionusing int_ids to get intersection names

As it can be seen in the output table, some segments such 1172 and 1173 have incorrect vids. Their start_vid and or end_vid represent segment sets rather than individual segment.

with start_node  as 
    (select * 
    from cafe_to."TEST_st_clair_west"
    left join congestion.segment_centreline_lookup b 
        using (segment_id) 
    left join gis.centreline_intersection d 
        on (b.start_int= d.int_id)
    )
select distinct 
    segment_id, 
    start_vid, 
    end_vid,
    start_int,
    end_int, 
    start_node.intersec5 as start_int,
    e.intersec5 as end_int,
    segment_list,
    dir,
    segment_geom
from start_node  
left join
gis.centreline_intersection e  
    on (end_int=e.int_id),
lateral congestion.get_segments_btwn_nodes(start_vid::int,end_vid::int) 
    results(start_point, end_point,segment_list,length,segment_geom)
order by segment_list
ShahrzadBorjian2 commented 1 year ago

I noticed some missing segments in the congestion network while I was creating study areas for the CafeTO project. Segments are broken/missing when a road class changes resulting in disconnected corridors. Please see the following example in the Downtown East study area:

Study Area: image

Missing Segments: there is no segment available in congestion.network_segments along Jones and Greenwood between Dundas and Queen. image