Skip to content

Commit 31b0d91

Browse files
Update SQL schema for OSMRailway
1 parent ccd877c commit 31b0d91

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

OSMRailway/schema.sql

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* (Beta) Export of data model OSMRailway of the subject dataModel.OpenStreetMap
2+
for a PostgreSQL database. Pending translation of enumerations and multityped attributes */
3+
CREATE TYPE electrified_type AS ENUM ('contact_line', 'rail', 'yes', 'no', '4_rail');
4+
CREATE TYPE osmType_type AS ENUM ('node', 'way', 'relation');
5+
CREATE TYPE railwayType_type AS ENUM ('rail', 'subway', 'tram', 'light_rail', 'narrow_gauge', 'monorail', 'funicular', 'miniature', 'preserved', 'disused', 'abandoned', 'construction', 'proposed');
6+
CREATE TYPE service_type AS ENUM ('spur', 'yard', 'siding', 'crossover');
7+
CREATE TYPE OSMRailway_type AS ENUM ('OSMRailway');
8+
CREATE TYPE usage_type AS ENUM ('main', 'branch', 'industrial', 'military', 'tourism', 'test', 'scientific');
9+
10+
CREATE TABLE OSMRailway (
11+
address JSON,
12+
alternateName TEXT,
13+
areaServed TEXT,
14+
bridge BOOLEAN,
15+
dataProvider TEXT,
16+
dateCreated TIMESTAMP,
17+
dateModified TIMESTAMP,
18+
description TEXT,
19+
electrified electrified_type,
20+
frequency NUMERIC,
21+
gauge NUMERIC,
22+
id TEXT PRIMARY KEY,
23+
layer NUMERIC,
24+
location JSON,
25+
maxSpeed NUMERIC,
26+
name TEXT,
27+
operator TEXT,
28+
osmId NUMERIC,
29+
osmLastModified TIMESTAMP,
30+
osmType osmType_type,
31+
owner JSON,
32+
railwayType railwayType_type,
33+
ref TEXT,
34+
seeAlso JSON,
35+
service service_type,
36+
source TEXT,
37+
tracks NUMERIC,
38+
tunnel BOOLEAN,
39+
type OSMRailway_type,
40+
usage usage_type,
41+
voltage NUMERIC
42+
);

0 commit comments

Comments
 (0)