departures for Saarland

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@230 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-10-03 08:52:04 +00:00
parent cbd3e42287
commit 1b8c97aa2d
5 changed files with 337 additions and 22 deletions

View file

@ -59,16 +59,23 @@ public abstract class AbstractHafasProvider implements NetworkProvider
else
oldZebra = zebra;
final Matcher mFineCoords = P_NEARBY_FINE_COORDS.matcher(mCoarse.group(2));
final Matcher mFineLocation = P_NEARBY_FINE_LOCATION.matcher(mCoarse.group(2));
if (mFineCoords.find() && mFineLocation.find())
if (mFineLocation.find())
{
final int parsedLon = Integer.parseInt(mFineCoords.group(1));
final int parsedLat = Integer.parseInt(mFineCoords.group(2));
int parsedLon = 0;
int parsedLat = 0;
final int parsedId = Integer.parseInt(mFineLocation.group(1));
final String parsedName = ParserUtils.resolveEntities(mFineLocation.group(2));
final Matcher mFineCoords = P_NEARBY_FINE_COORDS.matcher(mCoarse.group(2));
if (mFineCoords.find())
{
parsedLon = Integer.parseInt(mFineCoords.group(1));
parsedLat = Integer.parseInt(mFineCoords.group(2));
}
stations.add(new Station(parsedId, parsedName, parsedLat, parsedLon, 0, null, null));
}
else
@ -130,6 +137,16 @@ public abstract class AbstractHafasProvider implements NetworkProvider
return 'I';
if (ucType.equals("ECB")) // EC, Verona-München
return 'I';
if (ucType.equals("INZ")) // Nacht
return 'I';
if (ucType.equals("RHI")) // ICE
return 'I';
if (ucType.equals("RHT")) // TGV
return 'I';
if (ucType.equals("TGD")) // TGV
return 'I';
if (ucType.equals("IRX")) // IC
return 'I';
// Regional Germany
if (ucType.equals("ZUG")) // Generic Train
@ -176,6 +193,12 @@ public abstract class AbstractHafasProvider implements NetworkProvider
// Bus
if (ucType.equals("BUS")) // Generic Bus
return 'B';
if (ucType.equals("AST")) // Anruf-Sammel-Taxi
return 'B';
if (ucType.equals("SEV")) // Schienen-Ersatz-Verkehr
return 'B';
if (ucType.equals("FB")) // Luxemburg-Saarbrücken
return 'B';
// Ferry
if (ucType.equals("AS")) // SyltShuttle, eigentlich Autoreisezug