Seems like a good candidate for a sweepline algorithm.
Create a list of the segment endpoints and tag them with a begin/end flag as well as a reference to the segment. Sort the list by increasing abscissa.
Now scan the list from left to right, while you maintain an active list of segments. Any "begin" point creates a segment entry in the list, an "end" point discards it. At any time, the active list will contain a subset of the segments that are in overlapping configuration between the previous and current "event" points.
By interpolation, evaluate the ordinates at these endpoints and sort them vertically. This allows you to
- detect the intersections (which correspond to re-orderings in the vertical list),
- find the lowest ordinates.
Finally, you will have to sort the intersections from left to right and in the end you will have a list of subsegments that do not intersect and which are in a total order vertically.