railport table structure#
List of railports in the model
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
railport* |
INTEGER |
NO |
The unique identifier of the rail terminal |
||
x |
NUMERIC |
NO |
0 |
x coordinate of the terminal |
|
y |
NUMERIC |
NO |
0 |
y coordinate of the terminal |
|
name |
TEXT |
NO |
Name of the terminal |
||
capacity |
REAL |
NO |
0 |
Capacity of the rail terminal (units: Twenty-foot Equivalent Units) |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE Railport (
"railport" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"x" NUMERIC NOT NULL DEFAULT 0,
"y" NUMERIC NOT NULL DEFAULT 0,
"name" TEXT NOT NULL,
"capacity" REAL NOT NULL DEFAULT 0
);
SELECT AddGeometryColumn( 'Railport', 'geo', SRID_PARAMETER, 'POINT', 'XY', 1);
SELECT CreateSpatialIndex( 'Railport' , 'geo' );
CREATE INDEX IF NOT EXISTS "Railport_I" ON "Railport" ("railport");