Create database schema for upper air soundings
This commit is contained in:
parent
a5259dda99
commit
87d5031e92
1 changed files with 31 additions and 0 deletions
31
db/xmet.sql
31
db/xmet.sql
|
@ -90,4 +90,35 @@ select
|
||||||
AddGeometryColumn('xmet_afos_message', 'poly', 4326, 'POLYGON'),
|
AddGeometryColumn('xmet_afos_message', 'poly', 4326, 'POLYGON'),
|
||||||
CreateSpatialIndex('xmet_afos_message', 'poly');
|
CreateSpatialIndex('xmet_afos_message', 'poly');
|
||||||
|
|
||||||
|
create table xmet_sounding (
|
||||||
|
id INTEGER PRIMARY KEY NOT NULL,
|
||||||
|
station TEXT NOT NULL,
|
||||||
|
timestamp_observed TIMESTAMP NOT NULL,
|
||||||
|
timestamp_released TIMESTAMP,
|
||||||
|
sample_count INTEGER,
|
||||||
|
data_source_pressure TEXT NOT NULL,
|
||||||
|
data_source_other TEXT NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
select AddGeometryColumn('xmet_sounding', 'coord', 4326, 'POINT'),
|
||||||
|
CreateSpatialIndex('xmet_sounding', 'coord');
|
||||||
|
|
||||||
|
create table xmet_sounding_sample (
|
||||||
|
id INTEGER PRIMARY KEY NOT NULL,
|
||||||
|
sounding_id INTEGER NOT NULL,
|
||||||
|
elapsed INTEGER NOT NULL,
|
||||||
|
pressure FLOAT,
|
||||||
|
pressure_qa TEXT NOT NULL,
|
||||||
|
height FLOAT,
|
||||||
|
height_qa TEXT NOT NULL,
|
||||||
|
temp FLOAT,
|
||||||
|
temp_qa TEXT NOT NULL,
|
||||||
|
humidity FLOAT,
|
||||||
|
dewpoint FLOAT,
|
||||||
|
wind_dir FLOAT,
|
||||||
|
wind_speed FLOAT,
|
||||||
|
|
||||||
|
FOREIGN KEY (sounding_id) REFERENCES xmet_sounding (id)
|
||||||
|
);
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
Loading…
Add table
Reference in a new issue