Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
santilland committed Feb 18, 2025
0 parents commit c48f364
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build_main.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
8 changes: 8 additions & 0 deletions catalogs/gtif-austria.yaml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions json_collections/LULUCF_land_use.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
]
}
]
}
1 change: 1 addition & 0 deletions json_indicators/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
21 changes: 21 additions & 0 deletions layers/baselayers.yaml
Original file line number Diff line number Diff line change
@@ -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: <a href="//s2maps.eu" target="_blank">Sentinel-2 cloudless - s2maps.eu</a> by <a href="//eox.at" target="_blank">EOX IT Services GmbH</a> (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 &copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors and <a href="//maps.eox.at/#data" target="_blank">others</a>, Rendering &copy; <a href="http://eox.at" target="_blank">EOX</a> }'
- 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 &copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors and <a href="//maps.eox.at/#data" target="_blank">others</a>, Rendering &copy; <a href="http://eox.at" target="_blank">EOX</a> }'
6 changes: 6 additions & 0 deletions layers/overlays.yaml
Original file line number Diff line number Diff line change
@@ -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 &copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, Made with Natural Earth, Rendering &copy; <a href="//eox.at" target="_blank">EOX</a> }'
visible: true
protocol: 'xyz'

0 comments on commit c48f364

Please sign in to comment.