Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of heatadapt indicators for GTIF #2622

Draft
wants to merge 22 commits into
base: staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ac68328
Production Deployment of GTIF with updated catalog structure 2024-03-…
lubojr Mar 21, 2024
059c750
Merge branch 'ui-panels-cat' into gtif-demo
lubojr Mar 21, 2024
1c44337
Merge pull request #2514 from eurodatacube/ui-panels-cat
lubojr Mar 26, 2024
5ed1daf
Merging latest staging developments to gtif demonstrator (#2563)
santilland Apr 30, 2024
5eb7f5d
Merging of latest main branch state, adding geosearch functionality (…
santilland Jun 26, 2024
113f653
chore: merging latest staging
santilland Jun 28, 2024
ff33b86
chore: integrating first heatadapt use case
santilland Jun 28, 2024
d87b35c
fix: for mouse coord position
santilland Jun 28, 2024
10a9e0f
feat: implemented support for changing cog sources based on various p…
santilland Jun 28, 2024
04cdf70
chore: added uc3 config and mapping for naming convention
santilland Jul 8, 2024
8fc264b
chore: adapt color ranges, add legends
lubojr Jul 11, 2024
6f31ee2
change colorscales
lubojr Jul 12, 2024
bd09a39
chore: initial new heatadapt config
santilland Oct 17, 2024
8d9571f
feat: implemented loading of statistical data for heatadapt data
santilland Oct 17, 2024
efd6499
chore: added imperviousness and land cover auxiliary data;
santilland Oct 18, 2024
c2105a5
chore: added config option to not show timeslider within gtif instance
santilland Oct 21, 2024
3a3e1cd
feat: added regression information for selected datasets in heatadapt
santilland Oct 21, 2024
a713473
chore: simplified regression description; added filtering for impervi…
santilland Oct 29, 2024
1397681
chore: merged latest staging, resolved conflicts
santilland Oct 29, 2024
21e3c1d
feat: added filters for land coverage type groups
santilland Oct 29, 2024
4c60377
chore: linter fixes
santilland Oct 29, 2024
f9d8df7
chore: separated heatadapt into two tools, adapted imperviosness styl…
santilland Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/public/css/gtif.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@

.v-expansion-panel-header {
text-transform: uppercase;
}

/* Overwrite of coordinate div position because in gtif it is misaligned */
.ol-control.ol-mouse-position {
top: -78px;
}
6 changes: 6 additions & 0 deletions app/src/components/DataPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@
:wmsStyles="indicatorObject.wmsStyles"
>
</wms-style-controls>
<cog-overwrite-controls
v-if="indicatorObject.cogOverwrite"
:cogOverwrite="indicatorObject.cogOverwrite"
></cog-overwrite-controls>
</v-col>
<v-col
:cols="12"
Expand Down Expand Up @@ -294,6 +298,7 @@ import StyleControls from '@/components/map/StyleControls.vue';
import DataMockupView from '@/components/DataMockupView.vue';
import AddToDashboardButton from '@/components/AddToDashboardButton.vue';
import WmsStyleControls from '@/components/map/WmsStyleControls.vue';
import CogOverwriteControls from '@/components/map/CogOverwriteControls.vue';
import VectorTileStyleControl from '@/components/map/VectorTileStyleControl.vue';
import VectorStyleControl from '@/components/map/VectorStyleControl.vue';
import SelectionInfoBar from '@/components/SelectionInfoBar.vue';
Expand All @@ -308,6 +313,7 @@ export default {
FilterControls,
StyleControls,
WmsStyleControls,
CogOverwriteControls,
VectorTileStyleControl,
DataMockupView,
SelectionInfoBar,
Expand Down
1 change: 1 addition & 0 deletions app/src/components/UiPanelsLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default {
id: 1,
title: this.indicatorPanelheader,
heightPercentage: 100,
heightPercentageBothOpen: 70,
},
];
this.panels.right = [];
Expand Down
104 changes: 104 additions & 0 deletions app/src/components/map/CogOverwriteControls.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<template>
<v-container fluid>
<v-row align="center"
v-for="(element, index) in cogOverwrite.queryParameters" :key="index">
<v-col cols="4" class="pa-0">
<v-subheader class="primary--text">
{{element.label}}
</v-subheader>
</v-col>

<v-col cols="8" class="pa-0">
<v-select
v-model="selects[index]"
class="primary--text"
:items="element.items"
item-text="label"
item-value="id"
label="Select"
persistent-hint
return-object
single-line
@change="updateMap($event, index)"
>
</v-select>
</v-col>
</v-row>
</v-container>
</template>

<script>

import { getMapInstance } from '@/components/map/map';
import GeoTIFF from 'ol/source/GeoTIFF';

export default {
name: 'VectorStyleControl',
props: {
cogOverwrite: Object,
},
data: () => ({
selects: [],
}),
mounted() {
const selects = [];
this.cogOverwrite.queryParameters.forEach((config) => {
const selectedItem = config.items.find((item) => item.id === config.selected);
selects.push(selectedItem);
});
this.selects = selects;
this.$store.subscribe((mutation) => {
if (mutation.type === 'features/SET_SELECTED_FEATURE') {
setTimeout(() => {
this.updateMap();
}, 500);
}
});
},
methods: {
updateMap() {
const { map } = getMapInstance('centerMap');
const layer = map.getAllLayers().find((l) => l.get('id') === this.cogOverwrite.sourceLayer);
let ts = this.cogOverwrite.templateUrl;
if (layer) {
for (let idx = 0; idx < this.selects.length; idx++) {
const selected = this.selects[idx].id;
const label = this.cogOverwrite.queryParameters[idx].id;
ts = ts.replace(`{${label}}`, selected);
}
// TODO: this is not really stable, but we can get the location from the selected feature
// This expects the name to match exactly
const city = this.$store.state.features.selectedFeature.indicatorObject.aoiID;
// Additional special mapping
const extraMapping = {
Graz: '33TWN',
Innsbruck: '32TPT',
Klagenfurt: '33TVM',
Salzburg: '33TUN',
Linz: '33UVP',
};
if (city) {
ts = ts.replace('{City}', city);
ts = ts.replace('{city}', `${city.toLowerCase()}_${extraMapping[city]}`);
}
const updatedSources = [
{ url: ts },
];
this.$store.state.indicators.selectedIndicator.display[0].sources = [{ url: ts }];
layer.setSource(new GeoTIFF({
sources: updatedSources,
normalize: false,
interpolate: false,
}));
}
// this.$emit('updatequeryparameter', true);
if (this.$store.state.features.selectedFeatures?.length > 0) {
window.dispatchEvent(new Event('fetch-custom-area-chart'));
}
},
},
};
</script>

<style lang="scss" scoped>
</style>
Loading
Loading