polaris.network.transit.transit_elements.Link#
- class polaris.network.transit.transit_elements.Link(srid)#
Bases:
objectTransit link element to feed into Transit_links
- Database class members:
transit_link (
int): ID of the transit link (updated when inserted in the database)from_node (
str): Origin of the transit connectionto_node (
str): Destination of the transit connectionpair (
str): Identifier of the stop pair as FROM_ID##TO_ID. For identification onlygeo (
LineString): Geometry of the transit link as direct connection between stopslength (
float): Link length measured directly from the geometry objecttype (
int): Route type (mode) for this transit linksrid (
int): srid of our working database
- __init__(srid) None#
- Args:
srid (
int): srid of our working database
Methods
__init__(srid)build_geo(from_point, to_point, gtfs_shape, ...)save_to_database(conn[, commit])Saves Transit link to the database
- __init__(srid) None#
- Args:
srid (
int): srid of our working database
- build_geo(from_point: Point, to_point: Point, gtfs_shape: LineString | None, previous_end: Point)#
- save_to_database(conn: Connection, commit=True) None#
Saves Transit link to the database
- get_link_id()#