diff --git a/chart/files/index.html b/chart/files/index.html index e5c656475ffdeb94078af5d7d928b38e72c706c4..bb8c6bb8b81e56181b59c2b5156fad0e653e564e 100644 --- a/chart/files/index.html +++ b/chart/files/index.html @@ -184,12 +184,13 @@ var config = { } ], "layers": [ + {{- range $layer_id, $layer := .Values.config.client.layers }} { - "id": 'VHR_IMAGE_2018_Level_1', - "displayName": 'VHR Image 2018 Level 1', - "displayColor": '#eb3700', + "id": {{ $layer_id | quote }}, + "displayName": {{ $layer.title | quote }}, + "displayColor": {{ $layer.display_color | default "eb3700" | quote }}, "display": { - "id": 'VHR_IMAGE_2018_Level_1__TRUE_COLOR', + "id": {{ $layer.layer | quote }}, "visible": false, "protocol": 'WMTS', "urls": baseUrlsWMTS, @@ -202,120 +203,20 @@ var config = { "options": [{ "name": "Style", "target": "display.extraParameters.LAYERS", - "values": [{ - "label": "VHR Image 2018 True Color", - "value": "VHR_IMAGE_2018_Level_1__TRUE_COLOR", - }, { - "label": "VHR Image 2018 True Color with masked validity", - "value": "VHR_IMAGE_2018_Level_1__masked_validity", - }, { - "label": "VHR Image 2018 False Color", - "value": "VHR_IMAGE_2018_Level_1__FALSE_COLOR", - }, { - "label": "VHR Image 2018 NDVI", - "value": "VHR_IMAGE_2018_Level_1__NDVI", - }] - }], - }, - "search": { - "protocol": "OpenSearch", - "url": baseUrl + "opensearch/collections/VHR_IMAGE_2018_Level_1/", - "id": "VHR_IMAGE_2018_Level_1", - "histogramBinCount": 28, - "format": "application/atom+xml", - "method": "GET", - "histogramThreshold": 600, - "lightweightBuckets": true, - "searchLimit": 600, - "loadMore": 600, - "pageSize": 200, - "countZeroRecords": true, - "parameters": [ - { - "type": "eo:sensorMode", - "name": "Sensor", - "title": "Sensor Mode" - }, - { - "max": 100, - "min": 0, - "step": 1, - "range": true, - "type": "eo:cloudCover", - "name": "Cloud Coverage", - "title": "Cloud Coverage in percent" - }, + "values": [ + {{- range $sub_layer_id, $sub_layer := $layer.sub_layers -}} { - "max": 360, - "min": 0, - "step": 1, - "range": true, - "type": "eo:acrossTrackIncidenceAngle", - "name": "Offnadir angle", - "title": "Across Track Incidence Angle in degrees" - }, - { - "max": 360, - "min": 0, - "step": 1, - "range": true, - "type": "eo:illuminationAzimuthAngle", - "name": "Sun elevation", - "title": "Illumination Azimuth Angle in degrees" + "label": {{ $sub_layer.label | quote }}, + "value": {{ $sub_layer_id | quote }}, }, - ], - "parametersFilterSettings": { - "collapsed": false, - }, - }, - "download": { - "protocol": "EO-WCS", - "url": baseUrl + "ows", - // "method": "GET", - "rewrite": { - // add __coverage to the coverageId - "from": "({{ "{{" }}id}})", - "to": "$1__coverage" - } - } - }, - { - "id": 'VHR_IMAGE_2018_Level_3', - "displayName": 'VHR Image 2018 Level 3', - "displayColor": '#37eb00', - "display": { - "id": 'VHR_IMAGE_2018_Level_3__TRUE_COLOR', - "visible": true, - "protocol": 'WMTS', - "urls": baseUrlsWMTS, - "format": 'image/png', - "projection": 'EPSG:4326', - "matrixSet": "WGS84", - "style": 'default', - "useMilliseconds": false, - "maxZoom": 17, - "options": [{ - "name": "Style", - "target": "display.extraParameters.LAYERS", - "values": [{ - "label": "VHR Image 2018 True Color", - "value": "VHR_IMAGE_2018_Level_3__TRUE_COLOR", - }, { - "label": "VHR Image 2018 True Color with masked validity", - "value": "VHR_IMAGE_2018_Level_3__masked_validity", - }, { - "label": "VHR Image 2018 False Color", - "value": "VHR_IMAGE_2018_Level_3__FALSE_COLOR", - }, { - "label": "VHR Image 2018 NDVI", - "value": "VHR_IMAGE_2018_Level_3__NDVI", - }] + {{- end -}} + ] }], }, "search": { "protocol": "OpenSearch", - "url": baseUrl + "opensearch/collections/VHR_IMAGE_2018_Level_3/", - "id": "VHR_IMAGE_2018_Level_3", + "url": baseUrl + "opensearch/collections/{{ $layer_id }}/", + "id": {{ $layer_id }}, "histogramBinCount": 28, "format": "application/atom+xml", "method": "GET", @@ -373,7 +274,8 @@ var config = { "to": "$1__coverage" } } - }, + } + {{- end -}} ], "overlayLayers": [ { @@ -397,12 +299,13 @@ var config = { "attribution": "Overlay { Data © <a href=\"//www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> contributors, Rendering © <a href=\"//eox.at\" target=\"_blank\">EOX</a> and <a href=\"//github.com/mapserver/basemaps\" target=\"_blank\">MapServer</a> }" } }, + {{- range $layer_id, $layer := .Values.config.client.overlay_layers }} { - "id": 'VHR_IMAGE_2018_Level_3__outlines', - "displayName": 'VHR Image 2018 Level 3 Outlines', - "displayColor": '#187465', + "id": {{ $layer_id | quote }}, + "displayName": {{ $layer.title | quote }}, + "displayColor": {{ $layer.display_color | quote }}, "display": { - "id": 'VHR_IMAGE_2018_Level_3__outlines', + "id": {{ $layer.layer | quote }}, "visible": false, "protocol": 'WMS', "urls": baseUrlsOws, @@ -414,54 +317,7 @@ var config = { "synchronizeTime": true, }, }, - { - "id": 'VHR_IMAGE_2018_Level_3__masked_validity__Full', - "displayName": 'VHR Image 2018 Level 3 True Color with masked validity Full Coverage', - "display": { - "id": 'VHR_IMAGE_2018_Level_3__masked_validity__Full', - "visible": false, - "protocol": 'WMTS', - "urls": baseUrlsWMTS, - "format": 'image/png', - "projection": 'EPSG:4326', - "matrixSet": "WGS84", - "maxZoom": 17, - "synchronizeTime": false, - "style": "default", - }, - }, - { - "id": 'VHR_IMAGE_2018_Level_3__Full', - "displayName": 'VHR Image 2018 Level 3 True Color Full Coverage', - "display": { - "id": 'VHR_IMAGE_2018_Level_3__Full', - "visible": false, - "protocol": 'WMTS', - "urls": baseUrlsWMTS, - "format": 'image/png', - "projection": 'EPSG:4326', - "matrixSet": "WGS84", - "maxZoom": 17, - "synchronizeTime": false, - "style": "default", - }, - }, - { - "id": 'VHR_IMAGE_2018_Level_3__FALSE_COLOR__Full', - "displayName": 'VHR Image 2018 Level 3 False Color Full Coverage', - "display": { - "id": 'VHR_IMAGE_2018_Level_3__FALSE_COLOR__Full', - "visible": false, - "protocol": 'WMTS', - "urls": baseUrlsWMTS, - "format": 'image/png', - "projection": 'EPSG:4326', - "matrixSet": "WGS84", - "maxZoom": 17, - "synchronizeTime": false, - "style": "default", - }, - } + {{- end -}} ] }; diff --git a/chart/values.yaml b/chart/values.yaml index f970371584f38656ac38452f294e862a714a8d00..068a15ac4fd1622719e8ad427530acfd9412887c 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -133,6 +133,9 @@ config: expires: 3600 key: /{tileset}/{grid}/{dim}/{z}/{x}/{y}.{ext} tilesets: + VHR_IMAGE_2018: + title: VHR Image 2018 True Color + abstract: VHR Image 2018 True Color VHR_IMAGE_2018__TRUE_COLOR: title: VHR Image 2018 True Color abstract: VHR Image 2018 True Color