jsonsql/compositions sentinel (setup_db)
Install the tables for defining sentinel compositions
The json command file compositions_sentinel_v090_sql.json is part of karttur’s GeoImagine project setup_db. Calling the json file will execute the following commands of the GeoImagine Framework.
{
"process": [
{
"processid": "createtable",
"overwrite": false,
"delete": false,
"parameters": {
"db": "karttur",
"schema": "sentinel",
"table": "compdef",
"command": [
"compid TEXT",
"content varchar(32)",
"layerid varchar(64)",
"prefix varchar(32)",
"scalefac real",
"offsetadd real",
"measure char(1) NOT NULL",
"dataunit varchar(32)",
"title varchar(255)",
"label varchar(255)",
"PRIMARY KEY (compid)"
]
}
},
{
"processid": "createtable",
"overwrite": false,
"delete": false,
"parameters": {
"db": "karttur",
"schema": "sentinel",
"table": "compprod",
"command": [
"compid TEXT",
"system varchar(16) NOT NULL",
"source TEXT",
"product varchar(32)",
"suffix varchar(64)",
"cellnull real",
"celltype varchar(8)",
"masked character(1) DEFAULT 'N'",
"title varchar(255)",
"label varchar(255)",
"frequency varchar(20)",
"PRIMARY KEY (compid,source,product,suffix)"
]
}
},
{
"processid": "createtable",
"overwrite": false,
"delete": false,
"parameters": {
"db": "karttur",
"schema": "sentinel",
"table": "layer",
"command": [
"layerid bigserial",
"compid TEXT",
"source TEXT",
"product varchar(32)",
"suffix varchar(64)",
"acqdatestr varchar(20)",
"acqdate date",
"doy smallint",
"createdate date DEFAULT CURRENT_DATE",
"utm char(3)",
"mgrsid char(3)",
"orbitid varchar(8)",
"PRIMARY KEY (compid,source,product,suffix,utm,mgrsid,orbitid,acqdatestr)"
]
}
},
{
"processid": "createtable",
"overwrite": false,
"delete": false,
"parameters": {
"db": "karttur",
"schema": "sentinel",
"table": "mask",
"command": [
"source TEXT",
"product varchar(32)",
"cellnull smallint",
"water smallint",
"cloudshadow smallint",
"snow smallint",
"cloud smallint",
"clear smallint",
"mask smallint ARRAY[3]",
"PRIMARY KEY (source,product)"
]
}
}
]
}