-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from dtemkin-volpe/develop
Add int/string id databases
- Loading branch information
Showing
61 changed files
with
429 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE IF NOT EXISTS curb_seg ( | ||
curb_seg_id INTEGER NOT NULL, | ||
link_id INTEGER NOT NULL, | ||
ref_node_id INTEGER NOT NULL, | ||
start_lr FLOAT NOT NULL CHECK (start_lr >= 0), | ||
end_lr FLOAT NOT NULL CHECK (end_lr >= 0), | ||
regulation TEXT, | ||
width FLOAT CHECK (width >= 0), | ||
PRIMARY KEY (curb_seg_id), | ||
FOREIGN KEY(link_id) REFERENCES link (link_id), | ||
FOREIGN KEY(ref_node_id) REFERENCES node (node_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE IF NOT EXISTS geometry ( | ||
geometry_id INTEGER NOT NULL, | ||
geometry TEXT, | ||
PRIMARY KEY (geometry_id) | ||
) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CREATE TABLE IF NOT EXISTS lane ( | ||
lane_id INTEGER NOT NULL, | ||
link_id INTEGER NOT NULL, | ||
lane_num INTEGER NOT NULL CHECK (lane_num >= -10) CHECK (lane_num <= 10), | ||
allowed_uses TEXT, | ||
r_barrier TEXT, | ||
l_barrier TEXT, | ||
width FLOAT CHECK (width >= 0), | ||
PRIMARY KEY (lane_id), | ||
FOREIGN KEY(link_id) REFERENCES link (link_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE IF NOT EXISTS lane_tod ( | ||
lane_tod_id INTEGER NOT NULL, | ||
lane_id INTEGER NOT NULL, | ||
timeday_id INTEGER, | ||
time_day TEXT, | ||
lane_num INTEGER NOT NULL CHECK (lane_num <= 10) CHECK (lane_num >= -10), | ||
allowed_uses TEXT, | ||
r_barrier TEXT, | ||
l_barrier TEXT, | ||
width FLOAT CHECK (width >= 0), | ||
PRIMARY KEY (lane_tod_id), | ||
FOREIGN KEY(timeday_id) REFERENCES time_set_definitions (timeday_id), | ||
FOREIGN KEY(lane_id) REFERENCES lane (lane_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
CREATE TABLE IF NOT EXISTS link ( | ||
link_id INTEGER NOT NULL, | ||
name TEXT, | ||
from_node_id INTEGER NOT NULL, | ||
to_node_id INTEGER NOT NULL, | ||
directed BOOLEAN NOT NULL, | ||
geometry_id INTEGER, | ||
geometry TEXT, | ||
parent_link_id INTEGER, | ||
dir_flag INTEGER, | ||
length FLOAT CHECK (length >= 0), | ||
grade FLOAT CHECK (grade >= -100) CHECK (grade <= 100), | ||
facility_type TEXT, | ||
capacity FLOAT CHECK (capacity >= 0), | ||
free_speed FLOAT CHECK (free_speed <= 200) CHECK (free_speed >= 0), | ||
lanes INTEGER CHECK (lanes >= 0), | ||
bike_facility TEXT, | ||
ped_facility TEXT, | ||
parking TEXT, | ||
allowed_uses TEXT, | ||
toll FLOAT, | ||
jurisdiction TEXT, | ||
row_width FLOAT CHECK (row_width >= 0), | ||
PRIMARY KEY (link_id), | ||
FOREIGN KEY(from_node_id) REFERENCES node (node_id), | ||
FOREIGN KEY(geometry_id) REFERENCES geometry (geometry_id), | ||
FOREIGN KEY(parent_link_id) REFERENCES link (link_id), | ||
FOREIGN KEY(to_node_id) REFERENCES node (node_id) | ||
) |
6 changes: 3 additions & 3 deletions
6
usage/database/link_tod.sql → usage/database/integer_ids/link_tod.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE TABLE IF NOT EXISTS location ( | ||
loc_id INTEGER NOT NULL, | ||
link_id INTEGER NOT NULL, | ||
ref_node_id INTEGER NOT NULL, | ||
lr FLOAT NOT NULL CHECK (lr >= 0), | ||
x_coord FLOAT, | ||
y_coord FLOAT, | ||
z_coord FLOAT, | ||
loc_type TEXT, | ||
zone_id INTEGER, | ||
gtfs_stop_id INTEGER, | ||
PRIMARY KEY (loc_id), | ||
FOREIGN KEY(link_id) REFERENCES link (link_id), | ||
FOREIGN KEY(ref_node_id) REFERENCES node (node_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CREATE TABLE IF NOT EXISTS movement ( | ||
mvmt_id INTEGER NOT NULL, | ||
node_id INTEGER NOT NULL, | ||
name TEXT, | ||
ib_link_id INTEGER NOT NULL, | ||
start_ib_lane INTEGER, | ||
end_ib_lane INTEGER, | ||
ob_link_id INTEGER NOT NULL, | ||
start_ob_lane INTEGER, | ||
end_ob_lane INTEGER, | ||
type TEXT NOT NULL, | ||
penalty FLOAT, | ||
capacity FLOAT, | ||
ctrl_type TEXT, | ||
mvmt_code TEXT, | ||
allowed_uses TEXT, | ||
geometry TEXT, | ||
PRIMARY KEY (mvmt_id), | ||
FOREIGN KEY(ob_link_id) REFERENCES link (link_id), | ||
FOREIGN KEY(node_id) REFERENCES node (node_id), | ||
FOREIGN KEY(ib_link_id) REFERENCES link (link_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CREATE TABLE IF NOT EXISTS movement_tod ( | ||
mvmt_tod_id INTEGER NOT NULL, | ||
mvmt_id INTEGER NOT NULL, | ||
time_day TEXT, | ||
timeday_id INTEGER, | ||
ib_link_id INTEGER NOT NULL, | ||
start_ib_lane INTEGER, | ||
end_ib_lane INTEGER, | ||
ob_link_id INTEGER NOT NULL, | ||
start_ob_lane INTEGER, | ||
end_ob_lane INTEGER, | ||
type TEXT NOT NULL, | ||
penalty FLOAT, | ||
capacity FLOAT, | ||
ctrl_type TEXT, | ||
mvmt_code TEXT, | ||
allowed_uses TEXT, | ||
PRIMARY KEY (mvmt_tod_id), | ||
FOREIGN KEY(mvmt_id) REFERENCES movement (mvmt_id), | ||
FOREIGN KEY(timeday_id) REFERENCES time_set_definitions (timeday_id), | ||
FOREIGN KEY(ib_link_id) REFERENCES link (link_id), | ||
FOREIGN KEY(ob_link_id) REFERENCES link (link_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE IF NOT EXISTS node ( | ||
node_id INTEGER NOT NULL, | ||
name TEXT, | ||
x_coord FLOAT NOT NULL, | ||
y_coord FLOAT NOT NULL, | ||
z_coord FLOAT, | ||
node_type TEXT, | ||
ctrl_type TEXT, | ||
zone_id INTEGER, | ||
parent_node_id INTEGER, | ||
PRIMARY KEY (node_id), | ||
FOREIGN KEY(zone_id) REFERENCES zone (zone_id), | ||
FOREIGN KEY(parent_node_id) REFERENCES node (node_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CREATE TABLE IF NOT EXISTS segment ( | ||
segment_id INTEGER NOT NULL, | ||
link_id INTEGER NOT NULL, | ||
ref_node_id INTEGER NOT NULL, | ||
start_lr FLOAT NOT NULL CHECK (start_lr >= 0), | ||
end_lr FLOAT NOT NULL CHECK (end_lr >= 0), | ||
grade FLOAT CHECK (grade <= 100) CHECK (grade >= -100), | ||
capacity FLOAT CHECK (capacity >= 0), | ||
free_speed FLOAT CHECK (free_speed <= 200) CHECK (free_speed >= 0), | ||
lanes INTEGER, | ||
l_lanes_added INTEGER, | ||
r_lanes_added INTEGER, | ||
bike_facility TEXT, | ||
ped_facility TEXT, | ||
parking TEXT, | ||
allowed_uses TEXT, | ||
toll FLOAT, | ||
jurisdiction TEXT, | ||
row_width FLOAT CHECK (row_width >= 0), | ||
PRIMARY KEY (segment_id), | ||
FOREIGN KEY(link_id) REFERENCES link (link_id), | ||
FOREIGN KEY(ref_node_id) REFERENCES node (node_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE IF NOT EXISTS segment_lane ( | ||
segment_lane_id INTEGER NOT NULL, | ||
segment_id INTEGER NOT NULL, | ||
lane_num INTEGER NOT NULL CHECK (lane_num <= 10) CHECK (lane_num >= -10), | ||
parent_lane_id INTEGER, | ||
allowed_uses TEXT, | ||
r_barrier TEXT, | ||
l_barrier TEXT, | ||
width FLOAT CHECK (width >= 0), | ||
PRIMARY KEY (segment_lane_id), | ||
FOREIGN KEY(segment_id) REFERENCES segment (segment_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE IF NOT EXISTS segment_lane_tod ( | ||
segment_lane_tod_id INTEGER NOT NULL, | ||
segment_lane_id INTEGER NOT NULL, | ||
timeday_id INTEGER, | ||
time_day TEXT, | ||
lane_num INTEGER NOT NULL CHECK (lane_num >= -10) CHECK (lane_num <= 10), | ||
allowed_uses TEXT, | ||
r_barrier TEXT, | ||
l_barrier TEXT, | ||
width FLOAT CHECK (width >= 0), | ||
PRIMARY KEY (segment_lane_tod_id), | ||
FOREIGN KEY(timeday_id) REFERENCES time_set_definitions (timeday_id), | ||
FOREIGN KEY(segment_lane_id) REFERENCES segment_lane (segment_lane_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE TABLE IF NOT EXISTS segment_tod ( | ||
segment_tod_id INTEGER NOT NULL, | ||
segment_id INTEGER NOT NULL, | ||
timeday_id INTEGER, | ||
time_day TEXT, | ||
capacity FLOAT CHECK (capacity >= 0), | ||
free_speed FLOAT CHECK (free_speed >= 0) CHECK (free_speed <= 200), | ||
lanes INTEGER, | ||
l_lanes_added INTEGER, | ||
r_lanes_added INTEGER, | ||
bike_facility TEXT, | ||
ped_facility TEXT, | ||
parking TEXT, | ||
toll FLOAT, | ||
allowed_uses TEXT, | ||
PRIMARY KEY (segment_tod_id), | ||
FOREIGN KEY(timeday_id) REFERENCES time_set_definitions (timeday_id), | ||
FOREIGN KEY(segment_id) REFERENCES segment (segment_id) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CREATE TABLE IF NOT EXISTS signal_controller ( | ||
controller_id INTEGER NOT NULL, | ||
PRIMARY KEY (controller_id) | ||
) |
Oops, something went wrong.