Skip to content

Commit

Permalink
Changes for sen2agri-services, COG and maccs post processing operations
Browse files Browse the repository at this point in the history
  • Loading branch information
cosminudroiu committed Feb 12, 2018
1 parent db6114b commit 4b72e46
Show file tree
Hide file tree
Showing 25 changed files with 585 additions and 246 deletions.
1 change: 1 addition & 0 deletions database/03-tables/105.satellite.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CREATE TABLE satellite
(
id int not null,
satellite_name varchar NOT NULL,
short_name varchar NOT NULL,

CONSTRAINT satellite_pkey PRIMARY KEY (id)
)
21 changes: 17 additions & 4 deletions database/07-data/07.satellite.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
INSERT INTO satellite(
id,
satellite_name)
satellite_name,
short_name)
VALUES (
1,
'sentinel2');
'sentinel2',
'S2');

INSERT INTO satellite(
id,
satellite_name)
satellite_name,
short_name)
VALUES (
2,
'landsat8');
'landsat8',
'L8');

INSERT INTO satellite(
id,
satellite_name,
short_name)
VALUES (
3,
'sentinel1',
'S1');
48 changes: 27 additions & 21 deletions database/07-data/09.config.sql
Original file line number Diff line number Diff line change
Expand Up @@ -204,32 +204,38 @@ INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l3b.lai
INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l3b.lai.produce_fapar', NULL, '1', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l3b.lai.produce_fcover', NULL, '1', '2017-10-24 14:56:57.501918+02');

INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.S1.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.S2.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.L8.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('S1.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('S2.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('L8.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('scheduled.lookup.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('scheduled.retry.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.enabled', NULL, 'true', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s1.enabled', NULL, 'false', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.enabled', NULL, 'true', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.enabled', NULL, 'true', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('s1.enabled', NULL, 'false', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('s2.enabled', NULL, 'true', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('l8.enabled', NULL, 'true', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('scheduled.lookup.enabled', NULL, 'true', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('scheduled.retry.enabled', NULL, 'true', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('scheduled.object.storage.move.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.query', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.query.user', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.query.password', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.download', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.download.user', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.download.password', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.query', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.query.user', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.query.password', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.download', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.download.user', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.download.password', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.query', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.query.user', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.query.password', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.download', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.download.user', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.datasource.download.password', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.query', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.query.user', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.query.password', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.download', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.download.user', NULL, '', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.datasource.download.password', NULL, '', '2017-10-24 14:56:57.501918+02');

INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l3a.cloud_optimized_geotiff_output', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l3b.cloud_optimized_geotiff_output', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l3e.cloud_optimized_geotiff_output', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l4a.cloud_optimized_geotiff_output', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('processor.l4b.cloud_optimized_geotiff_output', NULL, '0', '2017-10-24 14:56:57.501918+02');

INSERT INTO config(key, site_id, value, last_updated) VALUES ('demmaccs.compress-tiffs', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('demmaccs.cog-tiffs', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('demmaccs.remove-sre', NULL, '1', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('demmaccs.remove-fre', NULL, '0', '2017-10-24 14:56:57.501918+02');


19 changes: 13 additions & 6 deletions database/07-data/10.config_metadata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ INSERT INTO config_metadata VALUES ('processor.l3b.lai.produce_fapar', 'L3B LAI
INSERT INTO config_metadata VALUES ('processor.l3b.lai.produce_fcover', 'L3B LAI processor will produce FCOVER', 'int', false, 4);

INSERT INTO config_metadata VALUES ('downloader.stopped', 'Downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.S1.stopped', 'S1 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.S2.stopped', 'S2 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.L8.stopped', 'L8 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('S1.enabled', 'S1 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('S2.enabled', 'S2 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('L8.enabled', 'L8 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.s1.stopped', 'S1 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.s2.stopped', 'S2 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.l8.stopped', 'L8 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('s1.enabled', 'S1 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('s2.enabled', 'S2 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('l8.enabled', 'L8 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('scheduled.lookup.enabled', 'Scheduled lookup is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('scheduled.retry.enabled', 'Scheduled retry is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('scheduled.object.storage.move.enabled', 'Scheduled object storage move enabled', 'bool', false, 15);
Expand All @@ -231,3 +231,10 @@ INSERT INTO config_metadata VALUES ('processor.l3b.cloud_optimized_geotiff_outpu
INSERT INTO config_metadata VALUES ('processor.l3e.cloud_optimized_geotiff_output', 'Generate L3E Cloud Optimized Geotiff outputs', 'bool', false, 18);
INSERT INTO config_metadata VALUES ('processor.l4a.cloud_optimized_geotiff_output', 'Generate L4A Cloud Optimized Geotiff outputs', 'bool', false, 5);
INSERT INTO config_metadata VALUES ('processor.l4b.cloud_optimized_geotiff_output', 'Generate L4B Cloud Optimized Geotiff outputs', 'bool', false, 6);

INSERT INTO config_metadata VALUES ('demmaccs.compress-tiffs', 'Compress the resulted L2A tiff files', 'bool', false, 16);
INSERT INTO config_metadata VALUES ('demmaccs.cog-tiffs', 'Produce L2A tiff files as Cloud Optimized Geotiff', 'bool', false, 16);
INSERT INTO config_metadata VALUES ('demmaccs.remove-sre', 'Remove SRE files from resulted L2A product', 'bool', false, 16);
INSERT INTO config_metadata VALUES ('demmaccs.remove-fre', 'Remove FRE files from resulted L2A product', 'bool', false, 16);


46 changes: 23 additions & 23 deletions install_platform/migrations/migration-1.7-1.7.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -136,89 +136,89 @@ begin

if not exists (select * from config_metadata where key = 'downloader.S1.stopped') then
_statement := $str$
INSERT INTO config_metadata VALUES ('downloader.S1.stopped', 'S1 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.s1.stopped', 'S1 downloader is stopped', 'bool', false, 15);
$str$;
raise notice '%', _statement;
execute _statement;
end if;
if not exists (select * from config where key = 'downloader.S1.stopped' and site_id is null) then
if not exists (select * from config where key = 'downloader.s1.stopped' and site_id is null) then
_statement := $str$
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.S1.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s1.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
$str$;
raise notice '%', _statement;
execute _statement;
end if;

if not exists (select * from config_metadata where key = 'downloader.S2.stopped') then
if not exists (select * from config_metadata where key = 'downloader.s2.stopped') then
_statement := $str$
INSERT INTO config_metadata VALUES ('downloader.S2.stopped', 'S2 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.s2.stopped', 'S2 downloader is stopped', 'bool', false, 15);
$str$;
raise notice '%', _statement;
execute _statement;
end if;
if not exists (select * from config where key = 'downloader.S2.stopped' and site_id is null) then
if not exists (select * from config where key = 'downloader.s2.stopped' and site_id is null) then
_statement := $str$
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.S2.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.s2.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
$str$;
raise notice '%', _statement;
execute _statement;
end if;

if not exists (select * from config_metadata where key = 'downloader.L8.stopped') then
if not exists (select * from config_metadata where key = 'downloader.l8.stopped') then
_statement := $str$
INSERT INTO config_metadata VALUES ('downloader.L8.stopped', 'L8 downloader is stopped', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('downloader.l8.stopped', 'L8 downloader is stopped', 'bool', false, 15);
$str$;
raise notice '%', _statement;
execute _statement;
end if;
if not exists (select * from config where key = 'downloader.L8.stopped' and site_id is null) then
if not exists (select * from config where key = 'downloader.l8.stopped' and site_id is null) then
_statement := $str$
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.L8.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('downloader.l8.stopped', NULL, '0', '2017-10-24 14:56:57.501918+02');
$str$;
raise notice '%', _statement;
execute _statement;
end if;

if not exists (select * from config_metadata where key = 'S1.enabled') then
if not exists (select * from config_metadata where key = 's1.enabled') then
_statement := $str$
INSERT INTO config_metadata VALUES ('S1.enabled', 'S1 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('s1.enabled', 'S1 is enabled', 'bool', false, 15);
$str$;
raise notice '%', _statement;
execute _statement;
end if;
if not exists (select * from config where key = 'S1.enabled' and site_id is null) then
if not exists (select * from config where key = 's1.enabled' and site_id is null) then
_statement := $str$
INSERT INTO config(key, site_id, value, last_updated) VALUES ('S1.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('s1.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
$str$;
raise notice '%', _statement;
execute _statement;
end if;

if not exists (select * from config_metadata where key = 'S2.enabled') then
if not exists (select * from config_metadata where key = 's2.enabled') then
_statement := $str$
INSERT INTO config_metadata VALUES ('S2.enabled', 'S2 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('s2.enabled', 'S2 is enabled', 'bool', false, 15);
$str$;
raise notice '%', _statement;
execute _statement;
end if;
if not exists (select * from config where key = 'S2.enabled' and site_id is null) then
if not exists (select * from config where key = 's2.enabled' and site_id is null) then
_statement := $str$
INSERT INTO config(key, site_id, value, last_updated) VALUES ('S2.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('s2.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
$str$;
raise notice '%', _statement;
execute _statement;
end if;

if not exists (select * from config_metadata where key = 'L8.enabled') then
if not exists (select * from config_metadata where key = 'l8.enabled') then
_statement := $str$
INSERT INTO config_metadata VALUES ('L8.enabled', 'L8 is enabled', 'bool', false, 15);
INSERT INTO config_metadata VALUES ('l8.enabled', 'L8 is enabled', 'bool', false, 15);
$str$;
raise notice '%', _statement;
execute _statement;
end if;
if not exists (select * from config where key = 'L8.enabled' and site_id is null) then
if not exists (select * from config where key = 'l8.enabled' and site_id is null) then
_statement := $str$
INSERT INTO config(key, site_id, value, last_updated) VALUES ('L8.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
INSERT INTO config(key, site_id, value, last_updated) VALUES ('l8.enabled', NULL, '0', '2017-10-24 14:56:57.501918+02');
$str$;
raise notice '%', _statement;
execute _statement;
Expand Down
Loading

0 comments on commit 4b72e46

Please sign in to comment.