-
Notifications
You must be signed in to change notification settings - Fork 70
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
Network creation splits arcs at each node #532
Comments
Yes, this is on purpose and expected, and yes, it will nearly always increase the number of arcs in the network. In Moreover, like #530, this procedure is a legacy of the implementation in the code design of Over the last several years I have gone back and forth on whether to (1) rely only on PySAL where possible; (2) completely restructure the code base to rely on outside packages; or (3) implement a dual workflow whereby users can either use only native PySAL geometries and operations or take advantage of outside packages. Each choice does, of course, come with its own set of pros & cons. Many of these thoughts & ideas can be found in the following issues: #403, #373 , #195. |
Thank you for the detailed explanations! The joy of legacy systems 😄 So the legacy behavior is to split the original linestrings at each vertex and - if I interpret spaghetti/spaghetti/network.py Lines 531 to 535 in 48210dc
However, later, functions such as spaghetti/spaghetti/network.py Lines 1203 to 1211 in 48210dc
I understand the reluctance to restructure everything and rely on outside packages. Luckily in this case, it seems like that's not necessary because PySAL may already include what we need. |
Yeah, before the |
After wondering why the number of rows in the streets GeoDataFrame is different from the number of rows in the spaghetti network arcs, I noticed that the network arcs are split at each node of the input line geometries. Is this on purpose? I find it rather unexpected and it can significantly increase the number of arcs in the network.
Visualization with point markers at start and end nodes:
The text was updated successfully, but these errors were encountered: