When we generate an intersection in the lane start (or end) we need to prune the extra segment(s) that may be before (or after) the intersection. We are already doing something to prevent this in https://github.com/ekumenlabs/terminus/blob/master/terminus/generators/monolane_generator.py#L105-L110, but we need to generalize it for an arbitrary set of waypoints as long as they belong to the same road node. As an example below is a capture where two segments exist before the junction connection:
When we generate an intersection in the lane start (or end) we need to prune the extra segment(s) that may be before (or after) the intersection. We are already doing something to prevent this in https://github.com/ekumenlabs/terminus/blob/master/terminus/generators/monolane_generator.py#L105-L110, but we need to generalize it for an arbitrary set of waypoints as long as they belong to the same road node. As an example below is a capture where two segments exist before the junction connection: