I want to use PostGIS to break up OpenStreetMap streets by intersection. I'm trying to put a city's streets into a graph structure, with nodes made by intersections and edges drawn by roads.
I'm currently using the ST_Intersection command carves up a road into all possible permutations of its components.
For a road with three intersections, for example (the second horizontal line from the top below), I want four pieces of separated road, but instead I get every possible combination of the road for the length of three blocks, two blocks, and one block. How do I simply get all the roads divided by each individual block?