mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 22:48:49 +00:00
glue multiple consecutive footways together
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@294 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
0a773096f0
commit
55f6787416
1 changed files with 11 additions and 1 deletions
|
@ -946,7 +946,17 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
if ("Fussweg".equals(productName))
|
||||
{
|
||||
final int min = (int) (arrivalTime.getTimeInMillis() - departureTime.getTimeInMillis()) / 1000 / 60;
|
||||
parts.add(new Connection.Footway(min, departureId, departure, arrivalId, arrival));
|
||||
|
||||
if (parts.size() > 0 && parts.get(parts.size() - 1) instanceof Connection.Footway)
|
||||
{
|
||||
final Connection.Footway lastFootway = (Connection.Footway) parts.remove(parts.size() - 1);
|
||||
parts.add(new Connection.Footway(lastFootway.min + min, lastFootway.departureId, lastFootway.departure, arrivalId,
|
||||
arrival));
|
||||
}
|
||||
else
|
||||
{
|
||||
parts.add(new Connection.Footway(min, departureId, departure, arrivalId, arrival));
|
||||
}
|
||||
}
|
||||
else if ("gesicherter Anschluss".equals(productName))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue