Add Shapes when shapes.txt is missing / no Shape assigned
The shapes.txt file of the GTFS specification is an optional file. To avoid special case handling in the algorithms in case of its absence, we implement artificial segments for all routes that do not provide a shape-id.
In a first step, which is the goal of this task, we should simple add a list of all stop locations (mandatory) along the line as a shape of the line. This new shape can then be used for visualisation in a consistent way with all shape-providing data sets.
The issue is targeting this part of the codebase. Instead of relying on the presence of shapes (here, the code should generate shapes on demand.
A new function should be added to the gtfs dataset that traverses all trips. If no geometry exists for said trip, all its stops need to be traversed (see stop_times) and a new shape has to be generated. This shape is added (with a new shape ID) to the set of existing shapes. Further processing can then make use of these newly created shapes and pretend that all feeds come with a shape file.
Later on, we might use OSM data / map matching from OSRM to find better connections between stop locations.
related: https://github.com/mapbox/directions-transit/issues/74