-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.5 KB
/
geojson.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Download Radverkehrsdaten
on:
schedule:
- cron: '30 5 * * *' # 5:30 UTC
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
steps:
- name: Set current date as env variable
run: echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Install ogr2ogr
run: sudo apt-get update && sudo apt-get install -y gdal-bin
- uses: actions/checkout@v3
- name: Download
run: wget -O HH_WFS_DB_Rad_Plus.gml "https://geodienste.hamburg.de/HH_WFS_DB_Rad_Plus?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&typename=de.hh.up:aktuelles_jahr,de.hh.up:letzte_woche"
- name: Convert 2024
run: ogr2ogr -f "GeoJSON" data/dbrad/dbrad_jahr_2024.json -s_srs EPSG:25832 -t_srs WGS84 -skipfailures HH_WFS_DB_Rad_Plus.gml aktuelles_jahr
- name: Convert Letzte Woche
run: ogr2ogr -f "GeoJSON" data/dbrad/dbrad_woche_$TODAY.json -s_srs EPSG:25832 -t_srs WGS84 -skipfailures HH_WFS_DB_Rad_Plus.gml letzte_woche
- name: Create/Refresh Symlink
run: ln -fs dbrad_woche_$TODAY.json data/dbrad/dbrad_letzte_woche.json
- name: Archive GeoJSON
uses: actions/upload-artifact@v3
with:
name: dist-json
path: |
data/dbrad/*.json
- uses: EndBug/add-and-commit@v9
with:
add: 'data/dbrad/*.json'
message: 'Fetched current data from Geoportal Hamburg'