polaris.network.transit.transit_elements.Trip#
- class polaris.network.transit.transit_elements.Trip#
Bases:
BasicPTElement
Transit trips read from trips.txt
- GTFS class members:
trip (
str
): Trip ID as read from the GTFS feedroute (
str
): Route ID as read from the GTFS feedservice_id (
str
): Service ID as read from the GTFS feedtrip_headsign (
str
): Trip headsign as read from the GTFS feedtrip_short_name (
str
): Trip short name as read from the GTFS feeddirection_id (
int
): Direction ID as read from the GTFS feedblock_id (
int
): Block ID as read from the GTFS feedbikes_allowed (
int
): Bikes allowed flag as read from the GTFS feedwheelchair_accessible (
int
): Wheelchair accessibility flag as read from the GTFS feedshape_id (
str
): Shape ID as read from the GTFS feed
- Processing class members:
trip_id (
int
): Unique trip_id as it will go into the databaseroute_id (
int
): Unique Route ID as will be available in the routes tablepattern_id (
int
): Unique Pattern ID for this route/stop-pattern as it will go into the databasepattern_hash (
str
): Pattern ID derived from stops for this route/stop-patternarrivals (
List[int]
): Sequence of arrival at stops for this tripdepartures (
List[int]
): Sequence of departures from stops for this tripstops (
List[Stop]
): Sequence of stops for this tripshape (
LineString
): Shape for this trip. Directly from shapes.txt or rebuilt from sequence of stops
- __init__()#
Methods
__init__
()from_row
(data)save_to_database
(conn[, commit])Saves Transit trip to the database
- __init__()#
- save_to_database(conn: Connection, commit=True) None #
Saves Transit trip to the database
- get_trip_id()#