accessVertexes.add(accessVertex);
}
}
}
// Check P+R accessibility by walking and driving.
TraversalRequirements walkReq = new TraversalRequirements(new RoutingRequest(
TraverseMode.WALK));
TraversalRequirements driveReq = new TraversalRequirements(new RoutingRequest(
TraverseMode.CAR));
boolean walkAccessibleIn = false;
boolean carAccessibleIn = false;
boolean walkAccessibleOut = false;
boolean carAccessibleOut = false;
for (IntersectionVertex accessVertex : accessVertexes) {
for (Edge incoming : accessVertex.getIncoming()) {
if (incoming instanceof StreetEdge) {
if (walkReq.canBeTraversed((StreetEdge)incoming))
walkAccessibleIn = true;
if (driveReq.canBeTraversed((StreetEdge)incoming))
carAccessibleIn = true;
}
}
for (Edge outgoing : accessVertex.getOutgoing()) {
if (outgoing instanceof StreetEdge) {
if (walkReq.canBeTraversed((StreetEdge)outgoing))
walkAccessibleOut = true;
if (driveReq.canBeTraversed((StreetEdge)outgoing))
carAccessibleOut = true;
}
}
}
if (walkAccessibleIn != walkAccessibleOut) {