Skip to content

Commit

Permalink
feat: add Polartep_S2_segmentation_demo
Browse files Browse the repository at this point in the history
- adapt colors of FLOE and SOD
- use testing catalog for production
  • Loading branch information
lubojr committed Jul 11, 2024
1 parent 768faca commit 9a0ac34
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/src/components/StacInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
@loaded="onStacInfoLoad"
header='["title"]'
tags='["themes"]'
properties='["satellite","sensor","agency","extent","license"]'
properties='["satellite","sensor","agency","extent"]'
featured='["description","providers","assets","links"]'
footer='["sci:citation"]'
:allowHtml.prop="true"
Expand Down
85 changes: 73 additions & 12 deletions app/src/config/polar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Wkt } from 'wicket';
import shTimeFunction from '../shTimeFunction';

export const dataPath = './data/polar/internal/';
export const STACEndpoint = 'https://eurodatacube.github.io/eodash-catalog/polar/catalog.json';
export const STACEndpoint = 'https://eodashcatalog.eox.at/polardashboard_s2_segmentation/polar/catalog.json';

const getDailyDates = (start, end) => {
let currentDate = DateTime.fromISO(start);
Expand Down Expand Up @@ -182,12 +182,25 @@ export const globalIndicators = [
style: {
color: [
'case',
['>', ['band', 1], 1],
['==', ['band', 1], 1],
[
'interpolate',
['linear'],
['band', 1],
...getColorStops('greys', 2, 5, 30, false),
'color', 255, 255, 255, 1,
],
['==', ['band', 1], 2],
[
'color', 201, 98, 222, 1,
],
['==', ['band', 1], 3],
[
'color', 124, 219, 103, 1,
],
['==', ['band', 1], 4],
[
'color', 42, 230, 199, 1,
],
['==', ['band', 1], 5],
[
'color', 14, 51, 236, 1,
],
[
'color', 0, 0, 0, 0,
Expand All @@ -203,12 +216,25 @@ export const globalIndicators = [
style: {
color: [
'case',
['>', ['band', 1], 1],
['==', ['band', 1], 1],
[
'interpolate',
['linear'],
['band', 1],
...getColorStops('greys', 2, 5, 30, false),
'color', 255, 255, 255, 1,
],
['==', ['band', 1], 2],
[
'color', 74, 36, 210, 1,
],
['==', ['band', 1], 3],
[
'color', 20, 171, 213, 1,
],
['==', ['band', 1], 4],
[
'color', 38, 233, 81, 1,
],
['==', ['band', 1], 5],
[
'color', 229, 66, 191, 1,
],
[
'color', 0, 0, 0, 0,
Expand Down Expand Up @@ -364,6 +390,41 @@ export const globalIndicators = [
},
},
},
{
properties: {
indicatorObject: {
indicator: 'Polartep_S2_segmentation_demo',
display: [{
protocol: 'cog',
name: 'Sentinel-2 source image',
legendUrl: null,
sources: [
{ url: 'https://eox-gtif-public.s3.eu-central-1.amazonaws.com/test_data_polartep/input-cog.tif' },
],
normalize: true,
}, {
protocol: 'cog',
sources: [
{ url: 'https://eox-gtif-public.s3.eu-central-1.amazonaws.com/test_data_polartep/inference-cog.tif' },
],
opacity: 0.7,
legendUrl: 'https://raw.githubusercontent.com/eurodatacube/eodash-assets/main/collections/Polartep_S2_segmentation_demo/cm_legend.png',
style: {
color: [
'case',
['==', ['band', 1], 1],
[
'color', 255, 255, 255, 1,
],
[
'color', 0, 0, 0, 0,
],
],
},
}],
},
},
},
{
properties: {
indicatorObject: {
Expand Down Expand Up @@ -441,7 +502,7 @@ export const globalIndicators = [
properties: {
indicatorObject: {
indicator: 'N12_1_sea_ice_concentration_arctic',
time: getDailyDates('1978-11-01', '2023-12-31'),
time: getDailyDates('1978-11-01', '2024-06-30'),
display: {
...polarStereoDatasetsConfigs,
dateFormatFunction: (date) => DateTime.fromISO(date).toFormat("yyyy-MM-dd'T11:59:30.000Z'"),
Expand Down

0 comments on commit 9a0ac34

Please sign in to comment.