Skip to content

Commit

Permalink
carry on stopAreaId to derived TransitStopFacilities and set stopArea…
Browse files Browse the repository at this point in the history
…Id to the original TransitStopFacility when not present yet (#3554)
  • Loading branch information
vsp-gleich authored Nov 8, 2024
1 parent 85a74f7 commit 5b9c396
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,14 @@ private Link getNetworkLink(final TransitRouteStop fromStop, final TransitRouteS
}
Id<TransitStopFacility> newId = Id.create(toFacility.getId().toString() + "." + Integer.toString(copies.size() + 1), TransitStopFacility.class);
TransitStopFacility newFacility = this.schedule.getFactory().createTransitStopFacility(newId, toFacility.getCoord(), toFacility.getIsBlockingLane());
newFacility.setStopAreaId(Id.create(toFacility.getId(), TransitStopArea.class));
Id<TransitStopArea> transitStopAreaId;
if (toFacility.getStopAreaId() == null) {
transitStopAreaId = Id.create(toFacility.getId(), TransitStopArea.class);
toFacility.setStopAreaId(transitStopAreaId);
} else {
transitStopAreaId = toFacility.getStopAreaId();
}
newFacility.setStopAreaId(transitStopAreaId);
newFacility.setLinkId(link.getId());
newFacility.setName(toFacility.getName());
copies.add(newFacility);
Expand Down

0 comments on commit 5b9c396

Please sign in to comment.