Proposed features/Route Segments
|Proposal status:||Draft (under way)|
|Definition:||It should be possible to split up routes in segments.|
|Rendered as:||Identical to existing type=route|
It should be possible to split up routes in segments.
- Some routes are very long (e.g. transeuropean hiking or cycle routes) and it is difficult to manage such long routes in an editor.
- Often several routes partially share the same ways. If every route has to be maintained from start to the end point, this is several times the same work.
Routes ("parent routes") can contain other routes (called "segments" or "child routes" in this proposal) as relation members.
Segments are added to the parent routes where the individual child route elements would be added otherwise. Child routes are no routes on their own. Instead, they contribute their members to their parent routes.
Segments can also add tags to their parents. If so, the tags meant for parent relations are listed in the optional add_tags tag. Existing tags in parent relations are never overridden by segments. Segments are processed in the order of appearance in the relation, depth first.
If needed, Segments can contain other segments, building up a hierarchy of nested route segments. However, hierarchies of more than two levels (more than the actual routes and one segment level below) may be confusing. That's why it is recommended to create them only where it saves a considerable amount of work and is easy to understand.
|type||route||Defines the relation as route.||mandatory|
|segment||yes||Marks the relation as a route segment instead of an own route.||mandatory|
|route||*||Defines the route type. The list is the same as for actual routes.||recommended for compatibility with old renderers|
|description||*||Explains the intended purpose of the segment - in particular things that the segment is supposed to include and not to include. Because mappers of dependent routes rely on this information, it should be written and changed carefully and all existing parents should be considered.||strongly recommended|
|add_tags||*||Semicolon separated list of tag names. The named tags will be used in the sameway as if they were defined in the parent route.||optional|
Linie 2 in Braunschweig
- Software which implements this Proposal
Bus route 1 in Heilbronn has seven stops that are used as initial or terminal stops.
Eastbound services start at stop 1, 2 or 3 and go any one of these routes:
- terminate at stop 4
- to stop 5 via stop 4, omitting the stop 7 detour
- to stop 6 via stops 4 and 5, omitting the stop 7 detour
- to stop 7 via stop 4
- to stop 5 via stops 4 and 7
- to stop 6 via stops 4, 7 and 5
With three initial and six terminal stops, there are 18 possibilities for an eastbound bus to go. Adding the 18 westbound possibilities, there are 36 variants of this bus route. According to the Public Transport Schema, every one of these variants should be represented by a separate relation, resulting in each one of the highways and stops between stops 3 and 4 being members of all of these 36 relations.
Using segments, the number of needed relations would rise, but the individual relations would be smaller and easier to maintain. More importantly, the highways and bus stops would not be direct members of that many route relations.
A route segment is created for every continuous part of the route that is shared by a common set of variants or routes. So a route segment ends at an initial or terminal stop or a point where a route splits (like the point x in the schema of the example).
14 segments would be neccessary in the given example. This gives us the following advantages:
- Every road or stop belongs to two route (segment) relations maximum
- The route relations contain considerably fewer members (in the given example a maximum of 8 segment relations)
Renderers and other software interpreting routes should handle route segments as part of the parent routes and not as distinct routes. Route relations tagged segment=yes that are not member of other routes can safely be ignored by these renderers.
Old software (unable to expand child routes) will ignore the segment tag and display the segment instead - losing information about which routes actually use the segment.
Not yet open.