polaris.network.transit.transit_elements.Route#
- class polaris.network.transit.transit_elements.Route(agency_id)#
Bases:
BasicPTElement
Transit route element to feed into Transit_routes
- Database class members:
route_id (
str
): ID of this route, starting with the agency prefix IDroute_short_name (
str
): Short name as found in the GTFS feedroute_long_name (
str
): Long name as found in the GTFS feedroute_desc (
str
): Route description as found in the GTFS feedroute_type (
int
): Route type (mode) for this transit linkroute_url (
str
): Route URL as found in the GTFS feedroute_color (
str
): Route color for mapping as found in the GTFS feedroute_text_color (
str
): Route color (text) for mapping as found in the GTFS feedroute_sort_order (
int
): Route rendering order as found in the GTFS feedagency_id (
str
): Agency IDseated_capacity (
float
): Vehicle seated capacity for this routedesign_capacity (
float
): Vehicle design capacity for this routetotal_capacity (
float
): Total vehicle capacity for this route
- __init__(agency_id)#
Methods
__init__
(agency_id)from_database
(conn, route_id)from_row
(data)populate
(record, headers)save_to_database
(conn[, commit])Saves route to the database
Attributes
- __init__(agency_id)#
- populate(record: tuple, headers: list) None #
- save_to_database(conn: Connection, commit=True) None #
Saves route to the database
- property data#
- from_database(conn: Connection, route_id: int)#
- get_route_id()#