wsp-sag / Lasso

Python package of utilities for Network Wrangler
https://wsp-sag.github.io/Lasso/
Apache License 2.0
5 stars 3 forks source link

Node missing shst_node_id and osm_node_id #153

Open yueshuaing opened 7 months ago

yueshuaing commented 7 months ago

In Lasso, during the process of converting GTFS shape to a list of node in cube format, the roadway network is joined to the shapes based on osm_node_id and shst_node_id to get the model_node_id for each node in GTFS shapes. Typically, buses are routed on the base network where all nodes have unique osm_node_id and shst_node_id. However, in the Metcouncil workflow, we did rerouting on the built roadway network where newly added nodes via project cards lack osm_node_id and shst_node_id. When the code links the roadway network to shapes, it results in null values in shape_model_node_id for shapes using these new added nodes. As a temporary solution, we divided the shapes data frame into two parts: one containing shapes missing shape_model_node_id, and the other containing shapes with shape_model_node_id. We then performed the joining process only for the former part, while skipping it for the latter. Finally, we combine these two parts to create a new shape data frame.