public class GraphIndex extends Object
Modifier and Type | Field and Description |
---|---|
Map<String,org.onebusaway.gtfs.model.Agency> |
agencyForId |
Graph |
graph |
LuceneIndex |
luceneIndex |
static int |
MAX_WALK_METERS
maximum distance to walk after leaving transit in Analyst
|
int |
overnightBreak
Used for finding first/last trip of the day.
|
Map<String,TripPattern> |
patternForId |
Map<org.onebusaway.gtfs.model.Trip,TripPattern> |
patternForTrip |
com.google.common.collect.Multimap<org.onebusaway.gtfs.model.Agency,TripPattern> |
patternsForAgency |
com.google.common.collect.Multimap<org.onebusaway.gtfs.model.Route,TripPattern> |
patternsForRoute |
com.google.common.collect.Multimap<org.onebusaway.gtfs.model.Stop,TripPattern> |
patternsForStop |
Map<org.onebusaway.gtfs.model.AgencyAndId,org.onebusaway.gtfs.model.Route> |
routeForId |
Map<String,org.onebusaway.gtfs.model.Route> |
routeForIdWithoutAgency |
Map<org.onebusaway.gtfs.model.AgencyAndId,String> |
serviceForId |
Map<String,StopCluster> |
stopClusterForId |
Map<org.onebusaway.gtfs.model.Stop,StopCluster> |
stopClusterForStop |
Map<org.onebusaway.gtfs.model.AgencyAndId,org.onebusaway.gtfs.model.Stop> |
stopForId |
Map<String,org.onebusaway.gtfs.model.Stop> |
stopForIdWithoutAgency |
com.google.common.collect.Multimap<String,org.onebusaway.gtfs.model.Stop> |
stopsForParentStation |
Map<org.onebusaway.gtfs.model.Stop,TransitStop> |
stopVertexForStop |
com.google.common.collect.Multimap<StopCluster,ProfileTransfer> |
transfersFromStopCluster |
Map<org.onebusaway.gtfs.model.AgencyAndId,org.onebusaway.gtfs.model.Trip> |
tripForId |
Map<String,org.onebusaway.gtfs.model.Trip> |
tripForIdWithoutAgency |
Map<String,Vertex> |
vertexForId |
Constructor and Description |
---|
GraphIndex(Graph graph) |
Modifier and Type | Method and Description |
---|---|
void |
clusterStops()
FIXME OBA parentStation field is a string, not an AgencyAndId, so it has no agency/feed scope
But the DC regional graph has no parent stations pre-defined, so no use dealing with them for now.
|
void |
clusterStopsAsNeeded()
Stop clustering is slow to perform and only used in profile routing for the moment.
|
Map<StopCluster,Double> |
findNearbyStopClusters(StopCluster sc,
double radius)
Find transfer candidates for profile routing.
|
List<StopTimesInPattern> |
getStopTimesForStop(org.onebusaway.gtfs.model.Stop stop,
org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
Get a list of all trips that pass through a stop during a single ServiceDate.
|
StopTreeCache |
getStopTreeCache()
Fetch a cache of nearby intersection distances for every transit stop in this graph, lazy-building as needed.
|
void |
initializeProfileTransfers()
Initialize transfer data needed for profile routing.
|
Set<org.onebusaway.gtfs.model.Route> |
routesForStop(org.onebusaway.gtfs.model.Stop stop)
Dynamically generate the set of Routes passing though a Stop on demand.
|
BitSet |
servicesRunning(org.joda.time.LocalDate date)
Wraps the other servicesRunning whose parameter is an OBA ServiceDate.
|
BitSet |
servicesRunning(org.onebusaway.gtfs.model.calendar.ServiceDate date)
An OBA Service Date is a local date without timezone, only year month and day.
|
Collection<StopTimesInPattern> |
stopTimesForStop(org.onebusaway.gtfs.model.Stop stop)
Fetch upcoming vehicle departures from a stop.
|
List<StopTimesInPattern> |
stopTimesForStop(org.onebusaway.gtfs.model.Stop stop,
long startTime,
int timeRange,
int numberOfDepartures)
Fetch upcoming vehicle departures from a stop.
|
public static final int MAX_WALK_METERS
public final Map<org.onebusaway.gtfs.model.AgencyAndId,org.onebusaway.gtfs.model.Stop> stopForId
public final Map<org.onebusaway.gtfs.model.AgencyAndId,org.onebusaway.gtfs.model.Trip> tripForId
public final Map<org.onebusaway.gtfs.model.AgencyAndId,org.onebusaway.gtfs.model.Route> routeForId
public final Map<String,TripPattern> patternForId
public final Map<org.onebusaway.gtfs.model.Stop,TransitStop> stopVertexForStop
public final Map<org.onebusaway.gtfs.model.Trip,TripPattern> patternForTrip
public final com.google.common.collect.Multimap<org.onebusaway.gtfs.model.Agency,TripPattern> patternsForAgency
public final com.google.common.collect.Multimap<org.onebusaway.gtfs.model.Route,TripPattern> patternsForRoute
public final com.google.common.collect.Multimap<org.onebusaway.gtfs.model.Stop,TripPattern> patternsForStop
public final com.google.common.collect.Multimap<String,org.onebusaway.gtfs.model.Stop> stopsForParentStation
public final Map<org.onebusaway.gtfs.model.Stop,StopCluster> stopClusterForStop
public final Map<String,StopCluster> stopClusterForId
public LuceneIndex luceneIndex
public com.google.common.collect.Multimap<StopCluster,ProfileTransfer> transfersFromStopCluster
public Graph graph
public final int overnightBreak
public GraphIndex(Graph graph)
public void clusterStopsAsNeeded()
public void initializeProfileTransfers()
public Map<StopCluster,Double> findNearbyStopClusters(StopCluster sc, double radius)
public BitSet servicesRunning(org.onebusaway.gtfs.model.calendar.ServiceDate date)
public BitSet servicesRunning(org.joda.time.LocalDate date)
public Set<org.onebusaway.gtfs.model.Route> routesForStop(org.onebusaway.gtfs.model.Stop stop)
public Collection<StopTimesInPattern> stopTimesForStop(org.onebusaway.gtfs.model.Stop stop)
public List<StopTimesInPattern> stopTimesForStop(org.onebusaway.gtfs.model.Stop stop, long startTime, int timeRange, int numberOfDepartures)
stop
- Stop object to perform the search forstartTime
- Start time for the search. Seconds from UNIX epochtimeRange
- Searches forward for timeRange seconds from startTimenumberOfDepartures
- Number of departures to fetch per patternpublic List<StopTimesInPattern> getStopTimesForStop(org.onebusaway.gtfs.model.Stop stop, org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
stop
- Stop object to perform the search forserviceDate
- Return all departures for the specified datepublic StopTreeCache getStopTreeCache()
public void clusterStops()
Copyright © 2015. All rights reserved.