Open jGaboardi opened 4 days ago
We should also have a reproducible code generating these.
We should also have a reproducible code generating these.
Do we think:
utils
(or somewhere else) that generates a non-articulation nodes network?i would suggest:
roads_osm.parquet
subfolders, and output: no_degree_2
subfolders
(notebook would be a very short one, but i think it's cleaner like this - we can possibly later merge it, if we find out that there is more data preprocessing to do, e.g. as we figured out with COINS yesterday, we will need a workflow step to remove (partially) overlapping linestrings before we run coins on the gdfs)@jGaboardi "articulation nodes" = nodes of degree 2 that are only there for the sake of documenting the geometry but should not be translated into network nodes, correct? (what is called "interstitial nodes" in OSMnx) just to be sure we're talking about the same thing.
question: are self-loops allowed? if so, are we keeping or removing them when we drop degree2 nodes? i'm thinking about a "lollipop" shape, where the head of the lollipop is a selfloop (or would a self-loop at the lollipop stick result in a degree3 node? confusion)
articulation nodes
non articulation nodes are degree 2 nodes in general - nodes in a graph where traversal decisions are not affected by their removal. Interstitial & non-articulation are interchangeable terms.
are self-loops allowed? if so, are we keeping or removing them when we drop degree2 nodes? i'm thinking about a "lollipop" shape, where the head of the lollipop is a selfloop (or would a self-loop at the lollipop stick result in a degree3 node? confusion)
hmmmm. That would inside momepy.remove_false_nodes()
. It's a good question and not immediately clear from reading the code. @martinfleis Do you know if this is the case?
I meant only a notebook calling momepy.remove_false_nodes
on input and saving these files. Otherwise this step is undocumented.
Not sure about self loop handling, will need to check once I'll be back at laptop.
I have already include a function in utils
in the meantime, along with a test. Shall I remove?
@anastassiavybornova Do have a known loop road case? If so, I can test that right now.
Can you push that function? I'm not sure what it does :). I don't mind having it but we need a notebook documenting this processing step.
Can you push that function? I'm not sure what it does :)
Absolutely, it merely wraps momepy.remove_false_nodes()
@anastassiavybornova & @martinfleis this is ready for re-review.
(I think)
This PR:
utils.py