We currently have code to go from a ServiceJourneyPattern with TimingLinks and ServiceLinks to a Route, where the actual PointProjection towards a RoutePoint from a ScheduledStopPoint is also created, and the TimingLinks itself are being disolved into a longer RouteLink.
For EPIP we need to be able to do this in the reverse direction as well:
Transform a StopPointInSequence + TimingPointInSequence into a StopPointInSequence with only ServiceLinks.
Given the PointProjection towards RoutePoints we know from what RoutePoint to what RoutePoint, and thus concatinate the found RouteLinks to resolve the shape of a ServiceLink. Some magic is required to skip duplicated points when joining.
We currently have code to go from a ServiceJourneyPattern with TimingLinks and ServiceLinks to a Route, where the actual PointProjection towards a RoutePoint from a ScheduledStopPoint is also created, and the TimingLinks itself are being disolved into a longer RouteLink.
For EPIP we need to be able to do this in the reverse direction as well:
Most of the code already exists: https://github.com/skinkie/reference/blob/master/gtfs-netex-test/db-to-db.py#L364