Skip to content

Commit

Permalink
update pygeoapi voor workshop
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsHoffmann committed Feb 11, 2025
1 parent 509fe24 commit 64373a2
Show file tree
Hide file tree
Showing 7 changed files with 606 additions and 155 deletions.
3 changes: 2 additions & 1 deletion OGC-API-Processes/pygeoapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# docker file voor ogc wps (pygeopapi)
#

FROM geopython/pygeoapi:latest
# FROM geopython/pygeoapi:latest
FROM geopython/pygeoapi:0.19.0

WORKDIR /pygeoapi

Expand Down
16 changes: 16 additions & 0 deletions OGC-API-Processes/pygeoapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@ Starten met `docker compose up`

als de container gestart is, is de server te benaderen op http://localhost:5000/

---
pygeoapi publiceert een docker image. In deze folder is een eigen dockerfile gedefinieerd op basis van dit image omdat een van de processes aanvullende python packages vereist.

#### client.ipynb

Dit is een Jupyter Notebook waarmee de Pygeoapi OGC API Processes aangeroepen worden.

Benodigde packages:
- jupyter notebook
- requests
- json
- geopandas
- folium (voor de kaartjes, zonder kan evt ook)

---
disclaimer: configuratie van Pygeoapi en het client notebook zijn ten behoeve van demonstratie en leerdoeleinden. Zeker niet geschikt om een productie installatie mee te doen!
1 change: 1 addition & 0 deletions OGC-API-Processes/pygeoapi/bomen.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "FeatureCollection", "features": [{"id": "556", "type": "Feature", "properties": {"id": "2069296", "leaf_type": "broadleaved", "species:nl": "Veldiep", "kap_aanvraag": "Meneer van Eik"}, "geometry": {"type": "Point", "coordinates": [4.810852, 52.331632]}}]}
275 changes: 129 additions & 146 deletions OGC-API-Processes/pygeoapi/client.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions OGC-API-Processes/pygeoapi/meetstations.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "FeatureCollection", "features": [{"id": "0", "type": "Feature", "properties": {"STN": 201, "TYPE": "Platform/AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [2.9358, 54.3256]}}, {"id": "1", "type": "Feature", "properties": {"STN": 203, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.3417, 52.36]}}, {"id": "2", "type": "Feature", "properties": {"STN": 204, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.6278, 53.2694]}}, {"id": "3", "type": "Feature", "properties": {"STN": 205, "TYPE": "Platform/AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [3.8103, 55.3992]}}, {"id": "4", "type": "Feature", "properties": {"STN": 206, "TYPE": "Platform/AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [4.0122, 54.1167]}}, {"id": "5", "type": "Feature", "properties": {"STN": 207, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.9603, 53.6144]}}, {"id": "6", "type": "Feature", "properties": {"STN": 208, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.9417, 53.4917]}}, {"id": "7", "type": "Feature", "properties": {"STN": 209, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.5175, 52.4636]}}, {"id": "8", "type": "Feature", "properties": {"STN": 210, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.4294, 52.1703]}}, {"id": "9", "type": "Feature", "properties": {"STN": 211, "TYPE": "Platform/AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [2.9453, 53.8242]}}, {"id": "10", "type": "Feature", "properties": {"STN": 212, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.1503, 52.9181]}}, {"id": "11", "type": "Feature", "properties": {"STN": 213, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.2933, 52.6978]}}, {"id": "12", "type": "Feature", "properties": {"STN": 214, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.0417, 54.0369]}}, {"id": "13", "type": "Feature", "properties": {"STN": 215, "TYPE": "AWS/Mistpost", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.4364, 52.1397]}}, {"id": "14", "type": "Feature", "properties": {"STN": 216, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.0422, 52.3194]}}, {"id": "15", "type": "Feature", "properties": {"STN": 218, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.8044, 52.6797]}}, {"id": "16", "type": "Feature", "properties": {"STN": 225, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.555, 52.4622]}}, {"id": "17", "type": "Feature", "properties": {"STN": 229, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.72, 52.995]}}, {"id": "18", "type": "Feature", "properties": {"STN": 233, "TYPE": "Mistpost", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.7258, 52.4819]}}, {"id": "19", "type": "Feature", "properties": {"STN": 235, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.7811, 52.9269]}}, {"id": "20", "type": "Feature", "properties": {"STN": 236, "TYPE": "Mistpost", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.0922, 52.3353]}}, {"id": "21", "type": "Feature", "properties": {"STN": 237, "TYPE": "Mistpost", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.6478, 52.255]}}, {"id": "22", "type": "Feature", "properties": {"STN": 238, "TYPE": "Mistpost", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.765, 52.1514]}}, {"id": "23", "type": "Feature", "properties": {"STN": 239, "TYPE": "Platform/AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [4.6961, 54.8539]}}, {"id": "24", "type": "Feature", "properties": {"STN": 240, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.7897, 52.3172]}}, {"id": "25", "type": "Feature", "properties": {"STN": 242, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.9208, 53.24]}}, {"id": "26", "type": "Feature", "properties": {"STN": 248, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.1736, 52.6325]}}, {"id": "27", "type": "Feature", "properties": {"STN": 249, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.9789, 52.6428]}}, {"id": "28", "type": "Feature", "properties": {"STN": 251, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.3458, 53.3911]}}, {"id": "29", "type": "Feature", "properties": {"STN": 252, "TYPE": "Platform/AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [3.2203, 53.2178]}}, {"id": "30", "type": "Feature", "properties": {"STN": 257, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.6031, 52.5053]}}, {"id": "31", "type": "Feature", "properties": {"STN": 258, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.4006, 52.6481]}}, {"id": "32", "type": "Feature", "properties": {"STN": 260, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.1797, 52.0989]}}, {"id": "33", "type": "Feature", "properties": {"STN": 265, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.2731, 52.1289]}}, {"id": "34", "type": "Feature", "properties": {"STN": 267, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.3833, 52.8967]}}, {"id": "35", "type": "Feature", "properties": {"STN": 269, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.5081, 52.4483]}}, {"id": "36", "type": "Feature", "properties": {"STN": 270, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.7517, 53.2231]}}, {"id": "37", "type": "Feature", "properties": {"STN": 273, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.8875, 52.7019]}}, {"id": "38", "type": "Feature", "properties": {"STN": 275, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.8722, 52.0547]}}, {"id": "39", "type": "Feature", "properties": {"STN": 277, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.1992, 53.4117]}}, {"id": "40", "type": "Feature", "properties": {"STN": 278, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.2589, 52.4344]}}, {"id": "41", "type": "Feature", "properties": {"STN": 279, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.5731, 52.7489]}}, {"id": "42", "type": "Feature", "properties": {"STN": 280, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.5847, 53.1236]}}, {"id": "43", "type": "Feature", "properties": {"STN": 283, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.6567, 52.0678]}}, {"id": "44", "type": "Feature", "properties": {"STN": 285, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.3983, 53.5739]}}, {"id": "45", "type": "Feature", "properties": {"STN": 286, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [7.1492, 53.1944]}}, {"id": "46", "type": "Feature", "properties": {"STN": 290, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.8908, 52.2731]}}, {"id": "47", "type": "Feature", "properties": {"STN": 308, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.3792, 51.38]}}, {"id": "48", "type": "Feature", "properties": {"STN": 310, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.5958, 51.4414]}}, {"id": "49", "type": "Feature", "properties": {"STN": 311, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.6719, 51.3789]}}, {"id": "50", "type": "Feature", "properties": {"STN": 312, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.6217, 51.7667]}}, {"id": "51", "type": "Feature", "properties": {"STN": 313, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.2419, 51.5036]}}, {"id": "52", "type": "Feature", "properties": {"STN": 315, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.9975, 51.4458]}}, {"id": "53", "type": "Feature", "properties": {"STN": 316, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.6939, 51.6558]}}, {"id": "54", "type": "Feature", "properties": {"STN": 317, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.0567, 51.7]}}, {"id": "55", "type": "Feature", "properties": {"STN": 319, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.8611, 51.2247]}}, {"id": "56", "type": "Feature", "properties": {"STN": 320, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.67, 51.9258]}}, {"id": "57", "type": "Feature", "properties": {"STN": 321, "TYPE": "Platform/AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.275, 51.9978]}}, {"id": "58", "type": "Feature", "properties": {"STN": 323, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [3.8836, 51.5258]}}, {"id": "59", "type": "Feature", "properties": {"STN": 324, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.0061, 51.5956]}}, {"id": "60", "type": "Feature", "properties": {"STN": 330, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.1217, 51.9911]}}, {"id": "61", "type": "Feature", "properties": {"STN": 331, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.1925, 51.4786]}}, {"id": "62", "type": "Feature", "properties": {"STN": 340, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.3419, 51.4478]}}, {"id": "63", "type": "Feature", "properties": {"STN": 343, "TYPE": "Windmast", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.3125, 51.8919]}}, {"id": "64", "type": "Feature", "properties": {"STN": 344, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.4469, 51.9606]}}, {"id": "65", "type": "Feature", "properties": {"STN": 348, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.9258, 51.9692]}}, {"id": "66", "type": "Feature", "properties": {"STN": 350, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [4.9353, 51.565]}}, {"id": "67", "type": "Feature", "properties": {"STN": 356, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.1453, 51.8578]}}, {"id": "68", "type": "Feature", "properties": {"STN": 370, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.3769, 51.4497]}}, {"id": "69", "type": "Feature", "properties": {"STN": 375, "TYPE": "AWS/Aerodrome", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.7067, 51.6586]}}, {"id": "70", "type": "Feature", "properties": {"STN": 377, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [5.7625, 51.1967]}}, {"id": "71", "type": "Feature", "properties": {"STN": 380, "TYPE": "AWS/Aerodrome", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [5.7619, 50.9053]}}, {"id": "72", "type": "Feature", "properties": {"STN": 391, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.1961, 51.4972]}}, {"id": "73", "type": "Feature", "properties": {"STN": 392, "TYPE": "AWS", "abnormality": 1}, "geometry": {"type": "Point", "coordinates": [6.0561, 51.4869]}}, {"id": "74", "type": "Feature", "properties": {"STN": 871, "TYPE": "AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [-63.2208, 17.6461]}}, {"id": "75", "type": "Feature", "properties": {"STN": 873, "TYPE": "AWS", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [-62.9828, 17.4956]}}, {"id": "76", "type": "Feature", "properties": {"STN": 990, "TYPE": "AWS/Aerodrome", "abnormality": -1}, "geometry": {"type": "Point", "coordinates": [-68.2758, 12.13]}}]}
9 changes: 7 additions & 2 deletions OGC-API-Processes/pygeoapi/pygeoapi.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ server:
language: en-US
cors: true
pretty_print: true
admin: ${PYGEOAPI_SERVER_ADMIN:-false}
limit: 1000
# limits:
# default_items: 10
# max_items: 50
map:
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
Expand All @@ -53,7 +57,7 @@ server:
output_dir: /tmp/

logging:
level: INFO
level: ERROR #INFO
#logfile: /tmp/pygeoapi.log

metadata:
Expand Down Expand Up @@ -100,6 +104,7 @@ resources:
- meetstations
extents:
spatial:
# bbox: [3.37,50.75,7.21,53.47]
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
Expand All @@ -118,7 +123,7 @@ resources:
- Sloten
extents:
spatial:
bbox: [-180,-90,180,90]
bbox: [3.37,50.75,7.21,53.47]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: feature
Expand Down
Loading

0 comments on commit 64373a2

Please sign in to comment.