I have a graph representing a road network and I need to clean it before working on it. Problem is that the original shapefile is not clean so when I make the graph I have many useless nodes too close from each other like in this picture:
I have 3 or 4 blobs like that on the map. The edges in those blobs are too short so there are many intersections, thus many nodes. I'm trying to merge the edges for example but I don't know how to locate these parts when I'm coding.
Does anyone have an idea on how to solve this ? I tried osmnx's simplify graph but it did not work; and was considering networkx's contract functions but i dont know how to find the these nodes.