mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
try to parse place from departure and arrival points
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@681 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
bd8907bdeb
commit
ee172bc0a5
1 changed files with 11 additions and 4 deletions
|
@ -1566,7 +1566,10 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
if (!"departure".equals(pp.getAttributeValue(null, "usage")))
|
if (!"departure".equals(pp.getAttributeValue(null, "usage")))
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
final int departureId = Integer.parseInt(pp.getAttributeValue(null, "stopID"));
|
final int departureId = Integer.parseInt(pp.getAttributeValue(null, "stopID"));
|
||||||
final String departureName = normalizeLocationName(pp.getAttributeValue(null, "name"));
|
final String departurePlace = normalizeLocationName(pp.getAttributeValue(null, "locality"));
|
||||||
|
String departureName = normalizeLocationName(pp.getAttributeValue(null, "nameWO"));
|
||||||
|
if (departureName == null)
|
||||||
|
departureName = normalizeLocationName(pp.getAttributeValue(null, "name"));
|
||||||
final int departureLat, departureLon;
|
final int departureLat, departureLon;
|
||||||
if ("WGS84".equals(pp.getAttributeValue(null, "mapName")))
|
if ("WGS84".equals(pp.getAttributeValue(null, "mapName")))
|
||||||
{
|
{
|
||||||
|
@ -1578,7 +1581,8 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
departureLat = 0;
|
departureLat = 0;
|
||||||
departureLon = 0;
|
departureLon = 0;
|
||||||
}
|
}
|
||||||
final Location departure = new Location(LocationType.STATION, departureId, departureLat, departureLon, null, departureName);
|
final Location departure = new Location(LocationType.STATION, departureId, departureLat, departureLon, departurePlace,
|
||||||
|
departureName);
|
||||||
if (firstDeparture == null)
|
if (firstDeparture == null)
|
||||||
firstDeparture = departure;
|
firstDeparture = departure;
|
||||||
final String departurePosition = normalizePlatform(pp.getAttributeValue(null, "platform"),
|
final String departurePosition = normalizePlatform(pp.getAttributeValue(null, "platform"),
|
||||||
|
@ -1607,7 +1611,10 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
if (!"arrival".equals(pp.getAttributeValue(null, "usage")))
|
if (!"arrival".equals(pp.getAttributeValue(null, "usage")))
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
final int arrivalId = Integer.parseInt(pp.getAttributeValue(null, "stopID"));
|
final int arrivalId = Integer.parseInt(pp.getAttributeValue(null, "stopID"));
|
||||||
final String arrivalName = normalizeLocationName(pp.getAttributeValue(null, "name"));
|
final String arrivalPlace = normalizeLocationName(pp.getAttributeValue(null, "locality"));
|
||||||
|
String arrivalName = normalizeLocationName(pp.getAttributeValue(null, "nameWO"));
|
||||||
|
if (arrivalName == null)
|
||||||
|
arrivalName = normalizeLocationName(pp.getAttributeValue(null, "name"));
|
||||||
final int arrivalLat, arrivalLon;
|
final int arrivalLat, arrivalLon;
|
||||||
if ("WGS84".equals(pp.getAttributeValue(null, "mapName")))
|
if ("WGS84".equals(pp.getAttributeValue(null, "mapName")))
|
||||||
{
|
{
|
||||||
|
@ -1619,7 +1626,7 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
arrivalLat = 0;
|
arrivalLat = 0;
|
||||||
arrivalLon = 0;
|
arrivalLon = 0;
|
||||||
}
|
}
|
||||||
final Location arrival = new Location(LocationType.STATION, arrivalId, arrivalLat, arrivalLon, null, arrivalName);
|
final Location arrival = new Location(LocationType.STATION, arrivalId, arrivalLat, arrivalLon, arrivalPlace, arrivalName);
|
||||||
lastArrival = arrival;
|
lastArrival = arrival;
|
||||||
final String arrivalPosition = normalizePlatform(pp.getAttributeValue(null, "platform"),
|
final String arrivalPosition = normalizePlatform(pp.getAttributeValue(null, "platform"),
|
||||||
pp.getAttributeValue(null, "platformName"));
|
pp.getAttributeValue(null, "platformName"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue