From efd64990347777f14390f9d689ffbee97ba5a1b5 Mon Sep 17 00:00:00 2001 From: Daniel Santillan Date: Fri, 18 Oct 2024 17:41:42 +0200 Subject: [PATCH] chore: added imperviousness and land cover auxiliary data; --- app/package-lock.json | 30 ++++++++++++++++++++++++++ app/package.json | 3 ++- app/src/config/gtif.js | 49 +++++++++++++++++++++++++++++++++++++++--- 3 files changed, 78 insertions(+), 4 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index 1c9bffa282..2d203f519d 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -23,6 +23,7 @@ "chartjs-chart-geo": "^2.1.0", "chartjs-plugin-annotation": "^0.5.7", "chartjs-plugin-datalabels": "^0.7.0", + "chartjs-plugin-regression": "^0.2.1", "chartjs-plugin-zoom": "^0.7.7", "colormap": "^2.3.2", "core-js": "^3.6.4", @@ -6225,6 +6226,17 @@ "chart.js": ">= 2.7.0 < 3" } }, + "node_modules/chartjs-plugin-regression": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/chartjs-plugin-regression/-/chartjs-plugin-regression-0.2.1.tgz", + "integrity": "sha512-87LCN1J9KeQlPRpdSUU3YOcOHUtfTTCOJXUuBAXuc8VVlKQjZdq7M9j60d4/juaHWxcGE7uGeUAnye2/FdtjJw==", + "dependencies": { + "regression": "^2.0.1" + }, + "peerDependencies": { + "chart.js": "^2.6.0" + } + }, "node_modules/chartjs-plugin-zoom": { "version": "0.7.7", "resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-0.7.7.tgz", @@ -16866,6 +16878,11 @@ "regl": "~2.1.0" } }, + "node_modules/regression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regression/-/regression-2.0.1.tgz", + "integrity": "sha512-A4XYsc37dsBaNOgEjkJKzfJlE394IMmUPlI/p3TTI9u3T+2a+eox5Pr/CPUqF0eszeWZJPAc6QkroAhuUpWDJQ==" + }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -26854,6 +26871,14 @@ "integrity": "sha512-PKVUX14nYhH0wcdCpgOoC39Gbzvn6cZ7O9n+bwc02yKD9FTnJ7/TSrBcfebmolFZp1Rcicr9xbT0a5HUbigS7g==", "requires": {} }, + "chartjs-plugin-regression": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/chartjs-plugin-regression/-/chartjs-plugin-regression-0.2.1.tgz", + "integrity": "sha512-87LCN1J9KeQlPRpdSUU3YOcOHUtfTTCOJXUuBAXuc8VVlKQjZdq7M9j60d4/juaHWxcGE7uGeUAnye2/FdtjJw==", + "requires": { + "regression": "^2.0.1" + } + }, "chartjs-plugin-zoom": { "version": "0.7.7", "resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-0.7.7.tgz", @@ -35231,6 +35256,11 @@ "regl-line": "~1.0.0" } }, + "regression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regression/-/regression-2.0.1.tgz", + "integrity": "sha512-A4XYsc37dsBaNOgEjkJKzfJlE394IMmUPlI/p3TTI9u3T+2a+eox5Pr/CPUqF0eszeWZJPAc6QkroAhuUpWDJQ==" + }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", diff --git a/app/package.json b/app/package.json index 0613cdc6a9..21d3628ad0 100644 --- a/app/package.json +++ b/app/package.json @@ -20,8 +20,8 @@ "@eox/itemfilter": "0.14.0", "@eox/jsonform": "^0.7.0", "@eox/layercontrol": "^0.17.3", - "@eox/stacinfo": "^0.3.3", "@eox/map": "^1.8.2", + "@eox/stacinfo": "^0.3.3", "@eox/storytelling": "^1.0.2", "@turf/difference": "^6.5.0", "axios": "^0.21.1", @@ -30,6 +30,7 @@ "chartjs-chart-geo": "^2.1.0", "chartjs-plugin-annotation": "^0.5.7", "chartjs-plugin-datalabels": "^0.7.0", + "chartjs-plugin-regression": "^0.2.1", "chartjs-plugin-zoom": "^0.7.7", "colormap": "^2.3.2", "core-js": "^3.6.4", diff --git a/app/src/config/gtif.js b/app/src/config/gtif.js index ce61804d3b..1f7cecbfcc 100644 --- a/app/src/config/gtif.js +++ b/app/src/config/gtif.js @@ -99,6 +99,11 @@ const heatadaptCM = [ { index: 1, rgb: [215, 25, 28] }, ]; +const heatadaptImperviousness = [ + { index: 0, rgb: [255, 253, 188] }, + { index: 1, rgb: [255, 180, 4] }, +]; + // stp = 1 / 6; // const heatadaptReds = [ // { index: 0, rgb: [255, 245, 240] }, @@ -1352,6 +1357,46 @@ export const globalIndicators = [ ], }, }, + { + protocol: 'cog', + id: 'LULUCF', + sources: [ + { url: 'https://eox-gtif-public.s3.eu-central-1.amazonaws.com/HeatAdapt/update/LULUCF_2018_AT_70m_3857_rendered.tif' }, + ], + name: 'Land Cover', + normalize: true, + visible: false, + style: {}, + }, + { + protocol: 'cog', + id: 'imperviousness', + sources: [ + { url: 'https://eox-gtif-public.s3.eu-central-1.amazonaws.com/HeatAdapt/update/IMD_2018_AT_70m_3857.tif' }, + ], + name: 'Imperviousness', + visible: false, + style: { + color: [ + 'case', + ['==', ['band', 4], 255], + [ + 'match', + ['band', 1], + 0, + ['color', 0, 0, 0, 1], + [ + 'interpolate', + ['linear'], + ['band', 1], + ...getColorStops(heatadaptImperviousness, 1, 254, 32), + ], + ], + // out of bounds color + ['color', 0, 0, 0, 0], + ], + }, + }, { layerName: 'geodb_debd884d-92f9-4979-87b6-eadef1139394:GTIF_AT_Gemeinden_3857', protocol: 'geoserverTileLayer', @@ -1360,10 +1405,8 @@ export const globalIndicators = [ color: 'rgba(0,0,0,0)', strokeWidth: 0.5, }, - id: 'air_quality_new_id', + id: 'gemeinde_lst', name: 'Administrative zone (Gemeinde)', - adminZoneKey: 'id_3', - parameters: 'pm10,id_3', selection: { mode: 'multiple', },