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

🐛 Bug: OSM network extraction with seemingly overlapping nodes, causing link distance to be zero #10

Open
7 tasks
i-am-sijia opened this issue Oct 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@i-am-sijia
Copy link
Member

Describe the bug

Initial issue reported by Rachel Wiken: Our model testing is crashing because we have links with zero distance, causing a divide by zero error. These zero distance links are places where we have nodes with identical Lat/Lon. The network has links connecting these identical nodes, causing links with no physical distance. ... Zero distance - 1 major arterial, 2 service roads and 1 footpath. They are coming in from the network, not something we are doing. I don’t know why there are duplicate nodes ...

Response from Sijia: Those “identical” nodes came from the network extracted from OpenStreetMap in Ranch. They are actually separate node records with different OSM ID, although they do seem to have the same coordinates. Ranch removes links if the A node OSM ID is the same as the B node OSM ID (cul-de-sac), but does not check if the coordinates are the same. The two nodes of the problematic arterial link -
image

I have not looked into why OpenStreetMap had duplicative nodes with seemly the same lat-long. Perhaps they differ in decimal places that are not present in the extracted data.

Follow up from Rachel: Ok further complication that I have to figure out 6448 and 198770 are identical nodes. There is a zero distance link from 6448 to 198770 but not in the reverse. A centroid connector uses 198770 and the bus network uses 6448 on one side of the node, and 198770 on the other. So for this location, I need to rebuild the road links using 198770 and reroute the bus network to only use 198770. Could you direct me to a snippet of project card for rerouting bus? I haven’t done transit project cards yet

Response from Sijia: Would it be better to just make the 0 distance links 0.001 instead? The distance field is calculated in the roadway_standard_to_met_council_network() step. I can modify the script to overwrite 0 with 0.001. This case we do not need to delete those “identical” nodes nor create additional project cards. I made a commit to Lasso. It should mask the 0 distance to 0.001.

Response from Rachel: The good news is that the transit line does flow through both points, so that should work. I checked the .lin file to make sure we wouldn’t have a transit route crash. I will add the dummy link in the opposite direction

Progress:

  • Sufficient information provided
  • Cause identified/found
  • Test developed/identified
  • Approach determined
  • Test passes

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Failing tests

  • No applicable test failed, need to create.
  • other...specify

Triggering line of code

Thoughts on resolution

Full stack trace

Environment

Operating system:
Context (conda, jupyter, etc):
Environment (e.g. output from conda list):

@i-am-sijia i-am-sijia added the bug Something isn't working label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant