Skip to main content
Ctrl+K

AequilibraE

    • Main menu
    • The AequilibraE Project
    • Project Components
    • Network manipulation
    • Distribution Procedures
    • Path Computation
    • Traffic Assignment
    • Public Transport
    • Transit Assignment
    • Route choice
    • Other Applications
  • Python
  • QGIS
  • GitHub
    • Main menu
    • The AequilibraE Project
    • Project Components
    • Network manipulation
    • Distribution Procedures
    • Path Computation
    • Traffic Assignment
    • Public Transport
    • Transit Assignment
    • Route choice
    • Other Applications
  • Python
  • QGIS
  • GitHub

Section Navigation

The AequilibraE Project

  • Project database
  • Project database SQL data model
    • about table structure
    • attributes documentation table structure
    • link types table structure
    • links table structure
    • matrices table structure
    • modes table structure
    • nodes table structure
    • periods table structure
    • results table structure
    • transit graph configs table structure
    • zones table structure
  • Parameters YAML File
  • Public Transport Database
  • Public Transport SQL Data model
    • agencies table structure
    • attributes documentation table structure
    • fare attributes table structure
    • fare rules table structure
    • fare zones table structure
    • link types table structure
    • links table structure
    • modes table structure
    • node types table structure
    • nodes table structure
    • pattern mapping table structure
    • results table structure
    • route links table structure
    • routes table structure
    • stop connectors table structure
    • stops table structure
    • trigger settings table structure
    • trips table structure
    • trips schedule table structure
  • Examples
    • Logging to terminal
    • Checking AequilibraE’s log
  • The AequilibraE project
  • Public Transport SQL Data model
  • route links table structure

route links table structure#

The route_links table holds information on the links of a route.

transit_link identifies the GTFS transit links for the route

pattern_id is an unique pattern for the route

seq identifies the sequence of the stops for a trip

from_stop identifies the stop the vehicle is departing

to_stop identifies the next stop the vehicle is going to arrive

distance identifies the distance (in meters) the vehicle travel between the stops

Field

Type

NULL allowed

Default Value

transit_link

INTEGER

NO

pattern_id

INTEGER

NO

seq

INTEGER

NO

from_stop

INTEGER

NO

to_stop

INTEGER

NO

distance

INTEGER

NO

geometry

LINESTRING

YES

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE IF NOT EXISTS route_links (
     transit_link            INTEGER    NOT NULL,
     pattern_id              INTEGER    NOT NULL,
     seq                     INTEGER    NOT NULL,
     from_stop               INTEGER    NOT NULL,
     to_stop                 INTEGER    NOT NULL,
     distance                INTEGER    NOT NULL,
     FOREIGN KEY(pattern_id) REFERENCES "routes"(pattern_id) deferrable initially deferred,
     FOREIGN KEY(from_stop)  REFERENCES "stops"(stop_id) deferrable initially deferred
     FOREIGN KEY(to_stop)    REFERENCES "stops"(stop_id) deferrable initially deferred
);

create UNIQUE INDEX IF NOT EXISTS route_links_stop_id ON route_links (pattern_id, transit_link);

select AddGeometryColumn( 'route_links', 'geometry', 4326, 'LINESTRING', 'XY');

select CreateSpatialIndex( 'route_links' , 'geometry' );

previous

results table structure

next

routes table structure

This Page

  • Show Source

© Copyright 2025-01-15, AequilibraE developers.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.