VMT: Remove 'Zug' from station names.

This commit is contained in:
Andreas Schildbach 2017-01-27 00:25:48 +01:00
parent 37a7f60329
commit 3766972f7e

View file

@ -43,7 +43,10 @@ public class VmtProvider extends AbstractHafasMobileProvider {
private static final String[] PLACES = { "Erfurt", "Jena", "Gera", "Weimar", "Gotha" };
@Override
protected String[] splitStationName(final String name) {
protected String[] splitStationName(String name) {
if (name.endsWith(" [Zug]"))
name = name.substring(0, name.length() - 6);
for (final String place : PLACES) {
if (name.startsWith(place + ", "))
return new String[] { place, name.substring(place.length() + 2) };