From c48f364d78141138925295ccad35f36c3ace24a1 Mon Sep 17 00:00:00 2001 From: Daniel Santillan Date: Tue, 18 Feb 2025 12:23:59 +0100 Subject: [PATCH] initial commit --- .github/workflows/build_main.yaml | 57 +++++++++++++++++++++++++++ .gitignore | 1 + catalogs/gtif-austria.yaml | 8 ++++ json_collections/LULUCF_land_use.json | 23 +++++++++++ json_indicators/test.json | 1 + layers/baselayers.yaml | 21 ++++++++++ layers/overlays.yaml | 6 +++ 7 files changed, 117 insertions(+) create mode 100644 .github/workflows/build_main.yaml create mode 100644 .gitignore create mode 100644 catalogs/gtif-austria.yaml create mode 100644 json_collections/LULUCF_land_use.json create mode 100644 json_indicators/test.json create mode 100644 layers/baselayers.yaml create mode 100644 layers/overlays.yaml diff --git a/.github/workflows/build_main.yaml b/.github/workflows/build_main.yaml new file mode 100644 index 0000000..d7c1eb8 --- /dev/null +++ b/.github/workflows/build_main.yaml @@ -0,0 +1,57 @@ +# This is a basic workflow takes care of building and deploying +# catalog when pushing to main branch + +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-22.04 + permissions: + contents: write + pages: write + pull-requests: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install dependencies + run: | + pip install -U pip + pip install json2yaml + pip install eodash_catalog==0.1.6 + - name: Convert JSON to YAML + run: | + mkdir -p collections + for file in json_collections/*.json; do + json2yaml "$file" > "collections/$(basename "$file" .json).yaml" + mkdir -p indicators + for file in json_indicators/*.json; do + json2yaml "$file" > "indicators/$(basename "$file" .json).yaml" + done + - name: Build + env: + SH_INSTANCE_ID: ${{ secrets.SH_INSTANCE_ID }} + SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }} + SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }} + SH_INSTANCE_ID_POLARTEP: ${{ secrets.SH_INSTANCE_ID_POLARTEP }} + SH_CLIENT_ID_POLARTEP: ${{ secrets.SH_CLIENT_ID_POLARTEP }} + SH_CLIENT_SECRET_POLARTEP: ${{ secrets.SH_CLIENT_SECRET_POLARTEP }} + # actually run the catalog generation + run: eodash_catalog + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: ./build + branch: gh-pages + clean-exclude: pr-preview + force: false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d163863 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ \ No newline at end of file diff --git a/catalogs/gtif-austria.yaml b/catalogs/gtif-austria.yaml new file mode 100644 index 0000000..7ba65f8 --- /dev/null +++ b/catalogs/gtif-austria.yaml @@ -0,0 +1,8 @@ +id: "GTIF-Austria" +title: "GTIF Austria" +description: "Green Transition Information Factory - Austria" +endpoint: "https://gtif-austria.github.io/public-catalog/GTIF-Austria/" +default_base_layers: "layers/baselayers" +default_overlay_layers: "layers/overlays" +collections: + - LULUCF_land_use \ No newline at end of file diff --git a/json_collections/LULUCF_land_use.json b/json_collections/LULUCF_land_use.json new file mode 100644 index 0000000..8726be9 --- /dev/null +++ b/json_collections/LULUCF_land_use.json @@ -0,0 +1,23 @@ +{ + "Agency": [ + "ESA" + ], + "Resources": [ + { + "Name": "COG source", + "Style": "test_assets/cog_style.json", + "Bbox": [11, 46.5, 15.5, 48.9], + "TimeEntries": [ + { + "Time": "2023", + "Assets": [ + { + "Identifier": "solar_power", + "File": "https://eox-gtif-public.s3.eu-central-1.amazonaws.com/DHI/v2/SolarPowerPotential_Annual_COG_clipped_3857_fixed.tif" + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/json_indicators/test.json b/json_indicators/test.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/json_indicators/test.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/layers/baselayers.yaml b/layers/baselayers.yaml new file mode 100644 index 0000000..5caa823 --- /dev/null +++ b/layers/baselayers.yaml @@ -0,0 +1,21 @@ +- id: cloudless-2022 + name: EOxCloudless 2022 + url: '//s2maps-tiles.eu/wmts/1.0.0/s2cloudless-2022_3857/default/g/{z}/{y}/{x}.jpeg' + media_type: image/jpeg + protocol: 'xyz' + visible: true + Attribution: '{ EOxCloudless 2022: Sentinel-2 cloudless - s2maps.eu by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2022) }' +- id: terrain-light + name: Terrain light + url: '//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpeg' + media_type: image/jpeg + visible: false + protocol: 'xyz' + Attribution: '{ Terrain light: Data © OpenStreetMap contributors and others, Rendering © EOX }' +- id: eox-osm + name: 'OSM Background' + url: '//s2maps-tiles.eu/wmts/1.0.0/osm_3857/default/g/{z}/{y}/{x}.jpeg' + media_type: image/jpeg + visible: false + protocol: 'xyz' + Attribution: '{ OSM: Data © OpenStreetMap contributors and others, Rendering © EOX }' diff --git a/layers/overlays.yaml b/layers/overlays.yaml new file mode 100644 index 0000000..f3c9d6b --- /dev/null +++ b/layers/overlays.yaml @@ -0,0 +1,6 @@ +- id: overlay_bright + name: 'Overlay labels' + url: '//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.png' + Attribution: '{ Overlay: Data © OpenStreetMap contributors, Made with Natural Earth, Rendering © EOX }' + visible: true + protocol: 'xyz' \ No newline at end of file