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 ID

  • route_short_name (str): Short name as found in the GTFS feed

  • route_long_name (str): Long name as found in the GTFS feed

  • route_desc (str): Route description as found in the GTFS feed

  • route_type (int): Route type (mode) for this transit link

  • route_url (str): Route URL as found in the GTFS feed

  • route_color (str): Route color for mapping as found in the GTFS feed

  • route_text_color (str): Route color (text) for mapping as found in the GTFS feed

  • route_sort_order (int): Route rendering order as found in the GTFS feed

  • agency_id (str): Agency ID

  • seated_capacity (float): Vehicle seated capacity for this route

  • design_capacity (float): Vehicle design capacity for this route

  • total_capacity (float): Total vehicle capacity for this route

__init__(agency_id)#

Methods

__init__(agency_id)

from_database(conn, route_id)

from_row(data)

get_route_id()

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()#