Following the example (https://github.com/gboeing/osmnx-examples/blob/main/notebooks/04-simplify-graph-consolidate-nodes.ipynb)
1st - grab an arbitrary location and graph around it, plot it with the nodes colored red.
import osmnx as ox
# get a street network and plot it with all edge intersections
point = 37.858495, -122.267468
G = ox.graph_from_point(point, network_type="drive", dist=500)
fig, ax = ox.plot_graph(G, node_color="r")
Results is an image with a collection of streets and nodes in red
Continuing on with the example, attempting to simplify/consolidate the intersections where the nodes are "close" and should actually reflect 1 intersection.
G_proj = ox.project_graph(G)
G2 = ox.consolidate_intersections(G_proj, rebuild_graph=True, tolerance=15, dead_ends=False)
fig, ax = ox.plot_graph(G2, node_color="r")
Results in an image where the "close enough" nodes have been combined into a single "intersection" (some of the red dots have combined now into a single dot), however the setting dead_ends=False
doesn't actually seem to remove (all) the nodes from the end of dead end streets, as you can still see 6 still identified in red. It does look like it removed 2 of the original 7 nodes that are on dead-end streets, but it seems to have removed the edge associated with those streets (top left and bottom right) and in the one case it eliminated the node and edge, but left the preceding street as a dead end street with a node (bottom right).
Question: Is there another modification required to remove the node at the end of a dead end street, is this the desired/correct output from the consolidate_intersections, and probably most importantly is there a better/more efficient way to attain OSM street/road/path/highway intersections (only) and exclude the end of a dead-end street?