Collection<Vertex> vertices = index.getVerticesForEnvelope(envelope);
for (Vertex v : vertices){
if (!(v instanceof TransitStopStreetVertex)){
continue;
}
TransitStopStreetVertex tsv = (TransitStopStreetVertex) v;
// Only use stop codes for linking TODO: find better method to connect stops without stop code
if (tsv.stopCode != null && tsv.stopCode.equals(stopCode)) {
new StreetTransitLink(ts, tsv, wheelchairAccessible);
new StreetTransitLink(tsv, ts, wheelchairAccessible);
LOG.debug("Connected " + ts.toString() + " to " + tsv.getLabel());
return true;
}
}
return false;
}