Closed highsource closed 8 years ago
Hm, I am not completely sure whether that would be the right course of action here. According to the spec:
The route_short_name contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves.
One could argue that a value like "ICE" does exactly that: provide a "short, abstract identifier" without any "indiciation of what places the route serves".... I guess you could argue that "ICE" or "EC" is perhaps too much of an abstraction.
Maybe it would be more appropriate to use trip['name']
("ICE 500" for example) as the route_short_name and to keep route_long_name
empty? However, the motivation for filling route_short_name
with it was to prevent the loss of the trip['type']
value in the feed., Atm I cannot think of a better way to represent the three layers of abstraction contained in DB-routes (Vehicle type like "train", "Zuggattung" like "ICE" and "Linie" like "EC 500") than to use route_short_name
and route_long_name
... but I am open for ideas!
I've tried using ICE 500 for route_short_name
but got warnings from the Google feed validator, it complained that short_name
was too long.
I was also thinking about outputting "from - to" as the long name. But then I've tried the feed in the OpenTripPlanner an OTP uses short/long name together with the headsign so that would've been a bit awkward.
Now I'm getting:
BAHN: DPN, ICE 128 to Amsterdam Centraal
With type as short name I was getting:
BAHN: DPN (ICE), ICE 128 to Amsterdam Centraal
Which is worse.
There's also Gattungsgruppe. :)
Type in GTFS... Not sure it is really needed as it can be easily derived from the short_name
. As an alternative we could use route_desc
to provide additional information.
I guess the validator doesnt like the whitespace in route_short_name
... I originally merged your PR with trip['name']
as route_short_name
, but swapped it back to your suggestion with 7f1eaa4. If it looks better in OTP, your sugeestions wins :)
Many thanks. :+1:
According to the spec:
So it's better output an empty string instead of
trip['type']
.