| |
- BusTrack.BusTrack(__builtin__.object)
-
- GTFSBusSchedule
-
- GTFSBusTrack
class GTFSBusSchedule(BusTrack.BusTrack) |
|
A BusTrack whose interpolation is mostly meaningless,
but will return correct location for times listed
in the GTFS schedule. |
|
- Method resolution order:
- GTFSBusSchedule
- BusTrack.BusTrack
- __builtin__.object
Methods defined here:
- __eq__(self, other)
- __hash__(self)
- __init__(self, trip_id, offset=0)
- Given the GTFS trip_id, loads and constructs the schedule.
Optionally, 'offset' seconds will be subtracted from each
time in the schedule.
Methods inherited from BusTrack.BusTrack:
- getArrivalTimeAtLocation(self, stoploc, tol=10.0, starttime=None)
- Given a stop location (lat,lon), a tolerance in meters, and a starting
time, does the following:
Finds the first time interval (t1,t2) within which the line segments
of this track are all within tol meters of stoploc, and t1>starttime.
Returns the time t such that t1<=t<=t2 at which this track was closest
to stoploc.
If this track was never within tol meters of the location, then
returns None.
- getBoundingBox(self)
- Returns (lonmin,lonmax,latmin,latmax) the lat/lon bounds
of this route's traversal.
- getLocationAtTime(self, time)
- Given a time, returns a (lat,lon) location of the (estimated)
location of the bus at that time. If the time is before or after
the bounding time of the route, then None is returned.
- getRouteTimeInterval(self)
- Returns the (begin,end) times for which this BusTrack exists.
- getTimesAtLocation(self, latlon, tol=10.0)
- Given a (lat,lon), returns the (begin,end) interval of the
(estimated) times that the bus was within tol meters of that
location.
- set_attributes(self, dictlike)
- Sets attributes as, for each key in dictlike,
self.key = dictlike[key]
Data descriptors inherited from BusTrack.BusTrack:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class GTFSBusTrack(GTFSBusSchedule) |
|
A BusTrack which interpolates the bus route along a
schedule defined by GTFS data, including the schedule
and the shape (if provided). |
|
- Method resolution order:
- GTFSBusTrack
- GTFSBusSchedule
- BusTrack.BusTrack
- __builtin__.object
Methods defined here:
- __init__(self, trip_id, offset=0, use_shape=True)
- Given the GTFS trip_id, loads and constructs the object.
Optionally, 'offset' seconds will be subtracted from every time
in the trip.
- findMatchingShapeIndex(self, stop, begin_idx=0, tol=20)
Methods inherited from GTFSBusSchedule:
- __eq__(self, other)
- __hash__(self)
Methods inherited from BusTrack.BusTrack:
- getArrivalTimeAtLocation(self, stoploc, tol=10.0, starttime=None)
- Given a stop location (lat,lon), a tolerance in meters, and a starting
time, does the following:
Finds the first time interval (t1,t2) within which the line segments
of this track are all within tol meters of stoploc, and t1>starttime.
Returns the time t such that t1<=t<=t2 at which this track was closest
to stoploc.
If this track was never within tol meters of the location, then
returns None.
- getBoundingBox(self)
- Returns (lonmin,lonmax,latmin,latmax) the lat/lon bounds
of this route's traversal.
- getLocationAtTime(self, time)
- Given a time, returns a (lat,lon) location of the (estimated)
location of the bus at that time. If the time is before or after
the bounding time of the route, then None is returned.
- getRouteTimeInterval(self)
- Returns the (begin,end) times for which this BusTrack exists.
- getTimesAtLocation(self, latlon, tol=10.0)
- Given a (lat,lon), returns the (begin,end) interval of the
(estimated) times that the bus was within tol meters of that
location.
- set_attributes(self, dictlike)
- Sets attributes as, for each key in dictlike,
self.key = dictlike[key]
Data descriptors inherited from BusTrack.BusTrack:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |