Skip to content

Commit

Permalink
chore: separated heatadapt into two tools, adapted imperviosness styl…
Browse files Browse the repository at this point in the history
…e and fixed issue of non loading dataset
  • Loading branch information
santilland committed Nov 13, 2024
1 parent 4c60377 commit f9d8df7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/src/components/DataMockupView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default {
show() {
return this.selectedFeatures?.length && this.indicatorObject
&& ['SOL1', 'SOL1_1', 'SOL1_2', 'SOL1_3', 'SOL1_4', 'SOL1_5', 'SOL1_6', 'SOL1_7',
'SOL2', 'SOL2_1', 'SOL2_2', 'SOL2_3', 'HAUC1',
'SOL2', 'SOL2_1', 'SOL2_2', 'SOL2_3', 'HAUC2',
].includes(this.indicatorObject.indicator);
// for now we set manually where we want the mockup to appear
},
Expand Down Expand Up @@ -379,7 +379,7 @@ export default {
});
});
}
if (['HAUC1'].includes(this.indicatorObject.indicator)) {
if (['HAUC2'].includes(this.indicatorObject.indicator)) {
const adminIds = [];
features.forEach((ftr) => {
adminIds.push(ftr.getId());
Expand Down
6 changes: 3 additions & 3 deletions app/src/components/IndicatorData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default {
],
scatterChartIndicators: [
'SOL1', 'SOL1_1', 'SOL1_2', 'SOL1_3', 'SOL1_4', 'SOL1_5', 'SOL1_6', 'SOL1_7', 'SOL2', 'SOL2_1', 'SOL2_2', 'SOL2_3', 'REP4_5', 'AQ1', // 'AQ1_1',
'AQ1_2', 'AQ1_3', 'AQ1_4', 'AQ1_5', 'AQ1_6', 'HAUC1',
'AQ1_2', 'AQ1_3', 'AQ1_4', 'AQ1_5', 'AQ1_6', 'HAUC2',
],
multiYearComparison: [
'E13e', 'E13f', 'E13g', 'E13h', 'E13i', 'E13l', 'E13m',
Expand Down Expand Up @@ -1309,7 +1309,7 @@ export default {
pointRadius: 2,
});
});
} else if (['HAUC1'].includes(indicatorCode)) {
} else if (['HAUC2'].includes(indicatorCode)) {
// Rendering for fetched data for rooftops
featureData.fetchedData.forEach((valArray, ind) => {
// for each gemeinde group into a dataset
Expand Down Expand Up @@ -1559,7 +1559,7 @@ export default {
// just one default yAxis
customSettings.yAxis = [this.indicatorObject.yAxis];
if (['HAUC1'].includes(indicatorCode)) {
if (['HAUC2'].includes(indicatorCode)) {
customSettings.plugins = {
regressions: {
onCompleteCalculation: (chart) => {
Expand Down
31 changes: 19 additions & 12 deletions app/src/config/gtif.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,10 @@ export const indicatorsDefinition = Object.freeze({
customAreaIndicator: true,
},
HAUC1: {
// customAreaIndicator: true,
baseLayers: solarAndGreenRoofDefaults,
},
HAUC2: {
customAreaIndicator: true,
baseLayers: solarAndGreenRoofDefaults,
},
Expand Down Expand Up @@ -1460,29 +1464,32 @@ export const globalIndicators = [
style: {
color: [
'case',
['==', ['band', 4], 255],
['>', ['band', 1], 0],
[
'match',
'interpolate',
['linear'],
['band', 1],
0,
['color', 0, 0, 0, 1],
[
'interpolate',
['linear'],
['band', 1],
...getColorStops(heatadaptImperviousness, 1, 254, 32),
],
...getColorStops(heatadaptImperviousness, 1, 100, 32),
],
// out of bounds color
['color', 0, 0, 0, 0],
],
},
},
],
},
},
},
{
properties: {
indicatorObject: {
indicator: 'HAUC2',
time: [],
display: [
{
layerName: 'geodb_debd884d-92f9-4979-87b6-eadef1139394:GTIF_AT_Gemeinden_3857',
protocol: 'geoserverTileLayer',
style: {
strokeColor: 'rgba(50,50,50,0.4)',
strokeColor: 'rgba(50,50,50,1)',
color: 'rgba(0,0,0,0)',
strokeWidth: 0.5,
},
Expand Down

0 comments on commit f9d8df7

Please sign in to comment.