Skip to content

Commit

Permalink
update Metadata test data, overall review
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Jun 9, 2024
1 parent 90b3898 commit 0cfb358
Show file tree
Hide file tree
Showing 17 changed files with 1,764 additions and 78 deletions.
16 changes: 8 additions & 8 deletions workshop/content/docs/advanced/bridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ In this section we'll have a look at how to publish Catalogue Service for the We
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: record
name: CSWFacade
data: https://demo.pycsw.org/cite/csw
id_field: identifier
time_field: datetime
title_field: title
name: CSWFacade
data: https://demo.pycsw.org/cite/csw
id_field: identifier
time_field: datetime
title_field: title
```

You can explore the proxied catalogue collection using this endpoints:
Expand Down Expand Up @@ -214,7 +214,7 @@ In this section we'll have a look at how to Publish a SensorThings API `Thing` a
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: feature
name: SensorThings
data: https://toronto-bike-snapshot.sensorup.com/v1.0/
entity: Things
name: SensorThings
data: https://toronto-bike-snapshot.sensorup.com/v1.0/
entity: Things
```
7 changes: 5 additions & 2 deletions workshop/content/docs/conclusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ goal is enabling low barrier, simple and flexible data publishing, using the OGC

[![OGC APIs banner](assets/images/OGC_APIs_banner.jpg){ width=40% }](https://ogcapi.ogc.org)

# GISE Hub Winter School on OGC Stack
# FOSS4G Europe 2024

Sending you all best wishes and enjoy the rest of the [GISE Hub Winter School on OGC Stack](https://drive.google.com/file/d/1Y4C-rX7OeihXSPXV2QjoUp5z6P_3oe5d/view)!
For those in attendance at [FOSS4G Europe 2024](https://2024.europe.foss4g.org):

- come to the [pygeoapi mid-year update](https://talks.osgeo.org/foss4g-europe-2024/talk/EQSNSK) presentation on Wednesday 03 July at 11h, in room GEOCAT (301)
- the pygeoapi team will be at the [community sprint](https://wiki.osgeo.org/wiki/FOSS4G-Europe-2024/CommunitySprint) on 06-07 July. Come join us!

# Contributing

Expand Down
16 changes: 10 additions & 6 deletions workshop/content/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ Version: 1.1

This workshop covers a wide range of topics (install/setup/configuration, publishing, cloud, templating, plugins, etc.). Please see the left hand navigation for the table of contents.

# Your [GISE Hub Winter School on OGC Stack](https://drive.google.com/file/d/1Y4C-rX7OeihXSPXV2QjoUp5z6P_3oe5d/view) workshop team
# Your [FOSS4G Europe 2024](https://2024.europe.foss4g.org) workshop team

<table>
<tr>
<td><a href="https://twitter.com/doublebyte"><img width="150" src="https://avatars.githubusercontent.com/u/1038897?v=4"/></a></td>
<td><a href="https://twitter.com/tomkralidis"><img width="150" src="https://avatars.githubusercontent.com/u/910430?v=4"/></a></td>
<td><a href="https://twitter.com/doublebyte"><img width="150" src="https://avatars.githubusercontent.com/u/1038897?v=4"/></a></td>
<td><a href="https://twitter.com/pvangenuchten"><img width="150" src="https://avatars.githubusercontent.com/u/299829?v=4"/></a></td>
<td><a href="https://twitter.com/justb4"><img width="150" src="https://avatars.githubusercontent.com/u/582630?v=4"/></a></td>
<td><a href="https://twitter.com/krishnaglodha"><img width="150" src="https://avatars.githubusercontent.com/u/47075664?v=4"/></a></td>
</tr>
<tr>
<td><a href="https://github.com/doublebyte1">Joana Simoes (OGC)</a></td>
<td><a href="https://github.com/tomkralidis">Tom Kralidis (OSGeo)</a></td>
<td><a href="https://github.com/krishnaglodha">Krishna Lodha (Rotten Grapes)</a></td>
<td><a href="https://github.com/tomkralidis">Tom Kralidis</a></td>
<td><a href="https://github.com/doublebyte1">Joana Simoes</a></td>
<td><a href="https://github.com/pvangenuchten">Paul van Genuchten</a></td>
<td><a href="https://github.com/justb4">Just van den Broecke</a></td>
<td><a href="https://github.com/krishnaglodha">Krishna Lodha</a></td>
</tr>
</table>

Expand Down Expand Up @@ -101,7 +105,7 @@ The workshop contents, wiki and issue tracker are managed on GitHub at [https://
A [Gitter](https://matrix.to/#/#geopython_diving-into-pygeoapi:gitter.im) channel exists for
discussion and live support from the developers of the workshop and other workshop participants.

For issues/bugs/suggestions or improvements/contributions, use the [GitHub issue tracker](https://github.com/geopython/diving-into-pygeoapi/issues).
For issues/bugs/suggestions or improvements/contributions, please use the [GitHub issue tracker](https://github.com/geopython/diving-into-pygeoapi/issues).

All bugs, enhancements and issues can be reported on [GitHub](https://github.com/geopython/diving-into-pygeoapi/issues).

Expand Down
1 change: 1 addition & 0 deletions workshop/content/docs/publishing/first.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ The relevant lines read:
volumes:
- ./pygeoapi/pygeoapi.config.yml:/pygeoapi/local.config.yml
- ./data:/data # Exercise 1 - Ready to pull data from here
- ./plugins/process/squared.py:/pygeoapi/pygeoapi/process/squared.py # Exercise 8
```

The local `./pygeoapi/pygeoapi.config.yml` file was already mounted. Now
Expand Down
36 changes: 11 additions & 25 deletions workshop/content/docs/publishing/ogcapi-records.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pygeoapi supports the OGC API - Records draft specification, using Elasticsearch
## Publish metadata records in pygeoapi

With pygeoapi we can setup OGC API - Records using any supported data provider. In this exercise we will use the [TinyDB](https://tinydb.readthedocs.io/en/latest/index.html)
Catalogue backend. We will use the sample catalogue in `workshop/exercises/data/records/catalogue.tinydb`.
Catalogue backend. We will use the sample catalogue in `workshop/exercises/data/records/tartu/catalogue.tinydb`.

!!! question "Update the pygeoapi configuration"

Expand All @@ -33,27 +33,26 @@ Catalogue backend. We will use the sample catalogue in `workshop/exercises/data/
``` {.yaml linenums="1"}
example_catalogue:
type: collection
title: FOSS4G Florence Record catalogue
description: FOSS4G Florence Record catalogue (OGC API - Records)
title: FOSS4G Europe Estonia national catalogue
description: FOSS4G Europe Estonia national catalogue
keywords:
- Services
- Infrastructures
- Florence
- FOSS4G
- estonia
- catalogue
- FOSS4G Europe
links:
- type: text/html
rel: canonical
title: information
href: http://opendata.comune.firenze.it
href: https://metadata.geoportaal.ee
hreflang: en-US
extents:
spatial:
bbox: [11.145, 43.718, 11.348, 43.84]
bbox: [23.3397953631, 57.4745283067, 28.1316992531, 59.6110903998]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: record
name: TinyDBCatalogue
data: /data/records/catalogue.tinydb
data: /data/records/tartu/catalogue.tinydb
id_field: externalId
time_field: recordCreated
title_field: title
Expand Down Expand Up @@ -82,7 +81,7 @@ It is possible to load more example ISO19139 metadata in a TinyDB database with

<div class="termy">
```bash
cd workshop/exercises/data/records
cd workshop/exercises/data/records/tartu
curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py
python3 load_tinydb_records.py xml catalogue.tinydb
```
Expand All @@ -94,27 +93,14 @@ If you do not have Python installed, you can the loader by using the OWSLib Dock

!!! example "Using the OWSLib Docker container to load metadata"

=== "Linux/Mac"
<div class="termy">
```bash
cd workshop/exercises
docker run -it --rm --network=host --name owslib -v $(pwd)/data:/data python:3.10-slim /bin/bash
pip3 install owslib
apt-get update -y && apt-get install curl -y
curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py
python3 load_tinydb_records.py /data/records/xml /data/records/catalogue.tinydb
```
</div>

=== "Windows"
<div class="termy">
```bash
cd workshop/exercises
docker run -it --rm --network=host --name owslib -v $(pwd)/data:/data python:3.10-slim /bin/bash
pip3 install owslib
apt-get update -y && apt-get install curl -y
curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py
python3 load_tinydb_records.py /data/records/xml /data/records/catalogue.tinydb
python3 load_tinydb_records.py /data/records/tartu/xml /data/records/tartu/catalogue.tinydb
```
</div>

Expand Down
12 changes: 6 additions & 6 deletions workshop/content/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ contain the latest pygeoapi and all its dependencies and external services (e.g.

## About Docker

Docker has been available for almost 10 years, and provided as a deployment option on numerous FOSS software and OSGeo projects. Given the current
Docker has been available since 2013, and provided as a deployment option on numerous FOSS software and OSGeo projects. Given the current
era of computing, chances are that you have heard of Docker and *containerization*. Or, perhaps are already familiar and hopefully using Docker already.
If not, there is an abundance of introductory materials that can be found online like this [tutorial from IBM](https://www.ibm.com/topics/docker).

Expand Down Expand Up @@ -140,7 +140,7 @@ data is a one-liner.


That's all! Open your browser and navigate to `http://localhost:5000`, the pygeoapi page will display.
As part of the initial `docker run`, Docker will download the pygeoapi Docker Image from [Docker hub](https://hub.Docker.com/r/geopython/pygeoapi).
As part of the initial `docker run`, Docker will download the pygeoapi Docker Image from [Docker Hub](https://hub.Docker.com/r/geopython/pygeoapi).
This may take some time, as the Docker image includes all dependencies (such as GDAL, etc.). Be patient! This is a one-time download for the entire workshop, or
you may want to do this beforehand.

Expand Down Expand Up @@ -222,7 +222,7 @@ In the next sections we will review additional examples of mounts to the data fo
## Using Docker for Python Clients

In some exercises we access `pygeoapi` remote endpoints using [OWSLib](https://owslib.readthedocs.io),
a Python library to interact with OGC Web Services. `OWSLib` can be installed using standard
a Python library to interact with OGC Web Services. OWSLib can be installed using standard
Python `pip3 install OWSLib`, but you may not have Python available, or you want to keep your system 'clean'.

As Docker is already available on your system, you can start up a
Expand All @@ -231,9 +231,9 @@ The magic line is:

`docker run -it --rm --network=host --name owslib python:3.10-slim /bin/bash`

This will pull a small (125MB) official Python Docker Image. When the Container is started you are directed into
a `Bash` session/prompt. The argument `--network=host` allows you to directly interact with services on your
host system, thus with `pygeoapi`, without setting up a Docker network. From there you can start `python3`, install `OWSLib` and
This will pull a small (125MB) official Python Docker Image. When the Container is started, you are directed into
a `bash` session/prompt. The argument `--network=host` allows you to directly interact with services on your
host system, thus with `pygeoapi`, without setting up a Docker network. From there you can start `python3`, install OWSLib and
maybe even other tools like `curl` and `wget`.

Below is a complete example, assuming pygeoapi runs on your `localhost` at port 5000:
Expand Down
20 changes: 16 additions & 4 deletions workshop/content/docs/standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ title: Standards

# Overview

This section provides a high level overview of pygeoapi standards support.
This section provides a high level overview of standards support in pygeoapi.

# Standards

Open standards are core to pygeoapi. Open standards allow for broad interoperability and plug and play capability. pygeoapi supports
a number of open standards (both formal and defacto or community driven).
Open standards are core to pygeoapi, and allow for broad interoperability and plug and play capability. pygeoapi supports
a number of open standards (both formal standards and defacto or community driven).

## API standards

Expand All @@ -25,7 +25,7 @@ pygeoapi implements the [OGC API](https://ogcapi.ogc.org) suite of standards fro

!!! Tip

You can learn more about OGC APIs on this workshop: <https://ogcapi-workshop.ogc.org/>
You can learn more about OGC APIs in the [OGC API workshop](https://ogcapi-workshop.ogc.org)

#### OGC API - Common

Expand All @@ -41,6 +41,7 @@ OGC API - Common provides the following functionality:
- `/collections`
- `/collections/foo`
- aspects such as pagination, links between resources, basic filtering, query parameters (`bbox`, `datetime`, etc.)
- shared models (exceptions, links, etc.)

OGC API - Common allows for specification developers to focus on the key functionality of a given API (i.e. data access, etc.)
while using common constructs. This harmonizes OGC API standards and enables deeper integration with less code. This also
Expand Down Expand Up @@ -162,6 +163,17 @@ The `f` parameter can be used with any pygeoapi endpoint to specify an output fo
});
```

Or using the native fetch API:

``` {.js linenums="1"}
const response = await fetch('https://demo.pygeoapi.io/master', {
method: 'GET',
headers: {
'Accept': 'application/json'
}
});
```

## the `skipGeometry` parameter

The `skipGeometry` (`true|false`, default is `false`) parameter can be used with feature data access to facilitate
Expand Down
1 change: 1 addition & 0 deletions workshop/content/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ theme:

plugins:
- search
- mkquartodocs

markdown_extensions:
- meta # option to add some meta tags on top, title, author, date, etc
Expand Down
1 change: 1 addition & 0 deletions workshop/exercises/data/records/tartu/catalogue.tinydb

Large diffs are not rendered by default.

Loading

0 comments on commit 0cfb358

Please sign in to comment.