transit stops table structure#
Lists all the transit stops in the model on which at least one transit trip stops during the day. It lists the agency it is associated to, as well as the closest network link to it
Additionally to transit stops, this table also holds nodes in the network associated with the active networks (walk and bike), more specifically the nodes created in the network to allow transit stops to be linked in what was previously the middle of a network link. If a node had to be moved during the GTFS map-matching (probably due to a too-sparse of a network), then the moved_by_matching field will contain the straight-line distance the stop was moved.
Many fields are not used during POLARIS simulation, and are stored only so a GTFS export after editing remains consistent with the GTFS originally imported. These fields are marked with “Not used by POLARIS” in the comments below.
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
|---|---|---|---|---|---|
stop_id* |
INTEGER |
YES |
ID of the stop/station used by POLARIS in the format AA0000000 (Agency) |
||
stop |
TEXT |
NO |
stop ID as seen in GTFS |
||
agency_id |
INTEGER |
NO |
Transit_Agencies(agency_id) |
ID of the agency to which the stop belongs to |
|
X |
REAL |
NO |
0 |
x coordinate of the stop in meters |
|
Y |
REAL |
NO |
0 |
y coordinate of the stop in meters |
|
Z |
REAL |
NO |
0 |
z coordinate of the stop in meters |
|
name |
TEXT |
YES |
name of the stop as seen in GTFS |
||
parent_station |
TEXT |
YES |
raw parent_station identifier as seen in stops.txt. Not used by POLARIS |
||
parent_station_id |
INTEGER |
YES |
Transit_Stops(parent_station_id) |
resolved Polaris stop_id of the parent station, when known. Not used by POLARIS |
|
description |
TEXT |
YES |
description of the stop as seen in GTFS |
||
street |
TEXT |
YES |
name of the stop as seen in GTFS |
||
zone |
INTEGER |
YES |
Zone(zone) |
zone of the stop as seen in the zone table |
|
transit_zone_id |
INTEGER |
YES |
Transit_Zones(transit_zone_id) |
transit zone of the stop as seen in the transit_zones table |
|
has_parking |
INTEGER |
NO |
0 |
indicates whether cars can park by the station for the park-and-ride and park-and-rail modes |
|
route_type |
INTEGER |
NO |
-1 |
collapsed GTFS route_type (basic 0-12) served at this stop, see transit_modes table for definitions |
|
moved_by_matching |
INTEGER |
YES |
0 |
indicates whether the stop is relocated by the map matching process |
|
stop_code |
TEXT |
YES |
short rider-facing code for the stop, as in stops.stop_code. Not used by POLARIS |
||
location_type |
INTEGER |
NO |
0 |
stops.txt location_type: 0 stop/platform, 1 station, 2 entrance/exit, 3 generic node, 4 boarding area. Not used by POLARIS |
|
wheelchair_boarding |
INTEGER |
NO |
0 |
stops.txt wheelchair_boarding: 0 unknown, 1 accessible, 2 not accessible. Not used by POLARIS |
|
stop_timezone |
TEXT |
YES |
stops.txt stop_timezone (TZ database name). Not used by POLARIS |
||
tts_stop_name |
TEXT |
YES |
text-to-speech version of stop_name, as in stops.tts_stop_name. Not used by POLARIS |
||
platform_code |
TEXT |
YES |
platform identifier for a platform stop within a station. Not used by POLARIS |
||
geo |
POINT |
NO |
‘’ |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE IF NOT EXISTS Transit_Stops(
stop_id INTEGER PRIMARY KEY AUTOINCREMENT ,
stop TEXT NOT NULL ,
agency_id INTEGER NOT NULL,
X REAL NOT NULL DEFAULT 0 ,
Y REAL NOT NULL DEFAULT 0 ,
Z REAL NOT NULL DEFAULT 0 ,
name TEXT,
parent_station TEXT,
parent_station_id INTEGER,
description TEXT,
street TEXT,
zone INTEGER,
transit_zone_id INTEGER,
has_parking INTEGER NOT NULL DEFAULT 0 ,
route_type INTEGER NOT NULL DEFAULT -1,
moved_by_matching INTEGER DEFAULT 0,
stop_code TEXT,
location_type INTEGER NOT NULL DEFAULT 0,
wheelchair_boarding INTEGER NOT NULL DEFAULT 0,
stop_timezone TEXT,
tts_stop_name TEXT,
platform_code TEXT,
FOREIGN KEY(agency_id) REFERENCES "Transit_Agencies"(agency_id),
FOREIGN KEY("zone") REFERENCES "Zone"("zone") deferrable initially deferred,
FOREIGN KEY("transit_zone_id") REFERENCES "Transit_Zones"("transit_zone_id"),
FOREIGN KEY("parent_station_id") REFERENCES "Transit_Stops"("stop_id") deferrable initially deferred
);
UPDATE SQLITE_SEQUENCE SET seq = 1000000000000 WHERE name = 'Transit_Stops';
select AddGeometryColumn( 'Transit_Stops', 'geo', SRID_PARAMETER, 'POINT', 'XY', 1);
select CreateSpatialIndex( 'Transit_Stops' , 'geo' );
create INDEX IF NOT EXISTS idx_polaris_transit_stops_stop_id ON Transit_Stops (stop_id);