RouteVariant element
Type: | routeVariant |
Namespace: | (default namespace) |
XML Schema: | ns0.xsd |
THIS CLASS IS BEING MERGED INTO STOPPATTERN / TRIPPATTERN. It is being kept around for reference and is expected to be removed eventually. A "route variant" represents a particular stop pattern on a particular route. For example, the N train has at least four different variants: express (over the Manhattan bridge), and local (via lower Manhattan and the tunnel) x to Astoria and to Coney Island. During construction, it sometimes has a fifth variant: along the D line to Coney Island after 59th St (or from Coney Island to 59th). Route names are intended for very general customer information, but sometimes there is a need to know where a particular trip actually goes. Route Variant names are guaranteed to be unique (among variants for a single route) but not stable across graph builds especially based on different GTFS inputs. They are machine-generated on a best-effort basis. For instance, if a variant is the only variant of the N that ends at Coney Island, the name will be "N to Coney Island". But if multiple variants end at Coney Island (but have different stops elsewhere), that name would not be chosen. OTP also tries start and intermediate stations ("from Coney Island", or "via Whitehall", or even combinations ("from Coney Island via Whitehall"). But if there is no way to create a unique name from start/end/intermediate stops, then the best we can do is to create a "like [trip id]" name, which at least tells you where in the GTFS you can find a related trip.
Example XML
<?xml version="1.0" encoding="UTF-8"?>
<RouteVariant>
<stops>
<stop agency="..." id="..." />
<stop agency="..." id="...">
<!--...-->
</stop>
<!--...more "stop" elements...-->
</stops>
<name>...</name>
<trips>
<trip headsign="..." numberOfTrips="..." calendarId="..." id="..." agency="..." />
<trip headsign="..." numberOfTrips="..." calendarId="..." id="..." agency="...">
<!--...-->
</trip>
<!--...more "trip" elements...-->
</trips>
<direction>...</direction>
<geometry>
<points>...</points>
<levels>...</levels>
<length>...</length>
</geometry>
</RouteVariant>