Skip to content

Commit bc407f2

Browse files
Update SQL schema for OSMBuilding
1 parent 47c10cd commit bc407f2

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

OSMBuilding/schema.sql

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/* (Beta) Export of data model OSMBuilding 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', 'customers', 'destination');
4+
CREATE TYPE buildingMaterial_type AS ENUM ('brick', 'concrete', 'wood', 'glass', 'steel', 'stone', 'plaster', 'metal', 'timber_framing', 'clay', 'sand', 'adobe', 'granite', 'limestone', 'marble');
5+
CREATE TYPE buildingType_type AS ENUM ('yes', 'residential', 'apartments', 'house', 'detached', 'bungalow', 'cabin', 'dormitory', 'hotel', 'ger', 'barracks', 'annexe', 'farm', 'farm_auxiliary', 'barn', 'commercial', 'office', 'industrial', 'warehouse', 'retail', 'supermarket', 'kiosk', 'school', 'university', 'hospital', 'clinic', 'church', 'cathedral', 'mosque', 'synagogue', 'temple', 'chapel', 'civic', 'government', 'public', 'transportation', 'train_station', 'stadium', 'grandstand', 'sports_hall', 'garage', 'garages', 'shed', 'greenhouse', 'conservatory', 'service', 'shed', 'roof', 'ruins');
6+
CREATE TYPE osmType_type AS ENUM ('node', 'way', 'relation');
7+
CREATE TYPE roofShape_type AS ENUM ('flat', 'gabled', 'hipped', 'half-hipped', 'pyramidal', 'gambrel', 'mansard', 'dome', 'skillion', 'round', 'saltbox', 'onion', 'cone');
8+
CREATE TYPE OSMBuilding_type AS ENUM ('OSMBuilding');
9+
CREATE TYPE wheelchair_type AS ENUM ('yes', 'no', 'limited');
10+
11+
CREATE TABLE OSMBuilding (
12+
access access_type,
13+
address JSON,
14+
alternateName TEXT,
15+
amenity TEXT,
16+
areaServed TEXT,
17+
buildingColour TEXT,
18+
buildingHeight NUMERIC,
19+
buildingLevels NUMERIC,
20+
buildingLevelsUnderground NUMERIC,
21+
buildingMaterial buildingMaterial_type,
22+
buildingType buildingType_type,
23+
dataProvider TEXT,
24+
dateCreated TIMESTAMP,
25+
dateModified TIMESTAMP,
26+
description TEXT,
27+
flats NUMERIC,
28+
id TEXT PRIMARY KEY,
29+
location JSON,
30+
minHeight NUMERIC,
31+
name TEXT,
32+
openingHours TEXT,
33+
operator TEXT,
34+
osmId NUMERIC,
35+
osmLastModified TIMESTAMP,
36+
osmType osmType_type,
37+
owner JSON,
38+
roofColour TEXT,
39+
roofMaterial TEXT,
40+
roofShape roofShape_type,
41+
seeAlso JSON,
42+
source TEXT,
43+
startDate TEXT,
44+
type OSMBuilding_type,
45+
wheelchair wheelchair_type
46+
);

0 commit comments

Comments
 (0)