Skip to content

Commit 606f2fd

Browse files
Update SQL schema for OSMHighway
1 parent 0f6f900 commit 606f2fd

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

OSMHighway/schema.sql

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* (Beta) Export of data model OSMHighway of the subject dataModel.OpenStreetMap
2+
for a PostgreSQL database. Pending translation of enumerations and multityped attributes */
3+
CREATE TYPE access_type AS ENUM ('yes', 'no', 'private', 'permissive', 'destination', 'delivery', 'customers', 'designated');
4+
CREATE TYPE highwayType_type AS ENUM ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential', 'service', 'living_street', 'pedestrian', 'track', 'footway', 'cycleway', 'path', 'motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary_link', 'road', 'busway', 'bus_guideway', 'construction', 'proposed');
5+
CREATE TYPE osmType_type AS ENUM ('node', 'way', 'relation');
6+
CREATE TYPE sidewalk_type AS ENUM ('both', 'left', 'right', 'none', 'separate');
7+
CREATE TYPE surface_type AS ENUM ('asphalt', 'concrete', 'gravel', 'dirt', 'paving_stones', 'cobblestone', 'unpaved', 'grass', 'compacted', 'fine_gravel', 'sand', 'ground', 'metal', 'wood', 'pebblestone', 'mud', 'ice', 'salt');
8+
CREATE TYPE OSMHighway_type AS ENUM ('OSMHighway');
9+
10+
CREATE TABLE OSMHighway (
11+
access access_type,
12+
address JSON,
13+
alternateName TEXT,
14+
areaServed TEXT,
15+
bridge BOOLEAN,
16+
cyclewayPresent BOOLEAN,
17+
dataProvider TEXT,
18+
dateCreated TIMESTAMP,
19+
dateModified TIMESTAMP,
20+
description TEXT,
21+
highwayType highwayType_type,
22+
id TEXT PRIMARY KEY,
23+
inclinePercent NUMERIC,
24+
lanes NUMERIC,
25+
layer NUMERIC,
26+
lit BOOLEAN,
27+
location JSON,
28+
maxSpeed NUMERIC,
29+
name TEXT,
30+
oneway BOOLEAN,
31+
operator TEXT,
32+
osmId NUMERIC,
33+
osmLastModified TIMESTAMP,
34+
osmType osmType_type,
35+
owner JSON,
36+
ref TEXT,
37+
seeAlso JSON,
38+
sidewalk sidewalk_type,
39+
source TEXT,
40+
surface surface_type,
41+
tunnel BOOLEAN,
42+
type OSMHighway_type,
43+
widthMeters NUMERIC
44+
);

0 commit comments

Comments
 (0)