Skip to content

Commit 7e33647

Browse files
authored
organize test data, add sources for Tartu metadata (#158)
1 parent 3aa1b82 commit 7e33647

19 files changed

+72
-51
lines changed

workshop/content/docs/publishing/first.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ title: Exercise 1 - Your first dataset
66

77
In this section you are going to publish a vector dataset.
88

9-
For this exercise, we will use a CSV dataset of [Bathing waters in Estonia](https://github.com/geopython/diving-into-pygeoapi/tree/main/workshop/exercises/data/bathingwater-estonia.csv),
9+
For this exercise, we will use a CSV dataset of [Bathing waters in Estonia](https://github.com/geopython/diving-into-pygeoapi/tree/main/workshop/exercises/data/tartu/bathingwater-estonia.csv),
1010
kindly provided by [Estonian Health Board](https://terviseamet.ee).
1111

12-
You can find this dataset in `workshop/exercises/data/bathingwater-estonia.csv`.
12+
You can find this dataset in `workshop/exercises/data/tartu/bathingwater-estonia.csv`.
1313

1414
This exercise consists of two steps:
1515

@@ -90,7 +90,7 @@ The config section reads:
9090
providers:
9191
- type: feature
9292
name: CSV
93-
data: /data/bathingwater-estonia.csv
93+
data: /data/tartu/bathingwater-estonia.csv
9494
id_field: id
9595
title_field: Name
9696
geometry:

workshop/content/docs/publishing/ogcapi-features.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Let's add the file `workshop/exercises/data/cp-tartu2.gpkg.zip`:
4242

4343
!!! question "Update the pygeoapi configuration"
4444

45-
First, let's unzip the file [cptartu2.gpkg.zip](https://github.com/geopython/diving-into-pygeoapi/tree/main/workshop/exercises/data/cptartu2.gpkg.zip) to `cptartu2.gpkg`.
45+
First, let's unzip the file [cptartu2.gpkg.zip](https://github.com/geopython/diving-into-pygeoapi/tree/main/workshop/exercises/data/tartu/cptartu2.gpkg.zip) to `cptartu2.gpkg`.
4646

4747
Then, open the pygeoapi configuration file in a text editor.
4848
Find the line `# START - EXERCISE 2 - cadastral parcels Tartu`.
@@ -70,7 +70,7 @@ Let's add the file `workshop/exercises/data/cp-tartu2.gpkg.zip`:
7070
providers:
7171
- type: feature
7272
name: SQLiteGPKG
73-
data: /data/cptartu2.gpkg # place correct path here
73+
data: /data/tartu/cptartu2.gpkg # place correct path here
7474
id_field: nationalca
7575
title_field: label
7676
table: cptartu2 # table name within gpkg
@@ -118,7 +118,7 @@ First we will load `bathingwater-estonia.geojson` into the Elasticsearch server.
118118
Edit the `add-data.sh` script within the `ES` folder, adding these two lines before the end:
119119

120120
``` {.bash linenums="1"}
121-
curl -o /tmp/bathingwater-estonia.geojson https://raw.githubusercontent.com/geopython/diving-into-pygeoapi/main/workshop/exercises/data/bathingwater-estonia.geojson
121+
curl -o /tmp/bathingwater-estonia.geojson https://raw.githubusercontent.com/geopython/diving-into-pygeoapi/main/workshop/exercises/data/tartu/bathingwater-estonia.geojson
122122
python3 /load_es_data.py /tmp/bathingwater-estonia.geojson id
123123
```
124124
Through these changes the file `bathingwater-estonia.geojson` is downloaded inside the Elasticsearch Docker container and then loaded into Elasticsearch.

workshop/content/docs/publishing/ogcapi-records.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pygeoapi supports the OGC API - Records draft specification, using Elasticsearch
2424
## Publish metadata records in pygeoapi
2525

2626
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)
27-
Catalogue backend. We will use the sample catalogue in `workshop/exercises/data/records/tartu/catalogue.tinydb`.
27+
Catalogue backend. We will use the sample catalogue in `workshop/exercises/data/tartu/metadata/catalogue.tinydb`.
2828

2929
!!! question "Update the pygeoapi configuration"
3030

@@ -52,7 +52,7 @@ Catalogue backend. We will use the sample catalogue in `workshop/exercises/data/
5252
providers:
5353
- type: record
5454
name: TinyDBCatalogue
55-
data: /data/records/tartu/catalogue.tinydb
55+
data: /data/tartu/metadata/catalogue.tinydb
5656
id_field: externalId
5757
time_field: recordCreated
5858
title_field: title
@@ -81,7 +81,7 @@ It is possible to load more example ISO19139 metadata in a TinyDB database with
8181

8282
<div class="termy">
8383
```bash
84-
cd workshop/exercises/data/records/tartu
84+
cd workshop/exercises/data/tartu/metadata
8585
curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py
8686
python3 load_tinydb_records.py xml catalogue.tinydb
8787
```
@@ -100,7 +100,7 @@ If you do not have Python installed, you can the loader by using the OWSLib Dock
100100
pip3 install owslib
101101
apt-get update -y && apt-get install curl -y
102102
curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py
103-
python3 load_tinydb_records.py /data/records/tartu/xml /data/records/tartu/catalogue.tinydb
103+
python3 load_tinydb_records.py /data/tartu/metadata/xml /data/tartu/metadata/catalogue.tinydb
104104
```
105105
</div>
106106

workshop/content/docs/publishing/ogcapi-tiles.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ include, but are not limited to:
4444

4545
For this exercise, you will publish a vector dataset of the [bathing water sources in Estonia](https://avaandmed.eesti.ee/datasets/joogiveeallikad), from the location below:
4646

47-
* data: `workshop/exercises/data/bathingwater-estonia.geojson`
47+
* data: `workshop/exercises/data/tartu/bathingwater-estonia.geojson`
4848

4949
Let's generate the tiles as the first step using tippecanoe:
5050

@@ -57,7 +57,7 @@ Let's generate the tiles as the first step using tippecanoe:
5757
cd workshop/exercises
5858
docker run -it --rm -v $(pwd)/data:/data emotionalcities/tippecanoe \
5959
tippecanoe -r1 -pk -pf --output-to-directory=/data/tiles/ --force --maximum-zoom=20 \
60-
--extend-zooms-if-still-dropping --no-tile-compression /data/bathingwater-estonia.geojson
60+
--extend-zooms-if-still-dropping --no-tile-compression /data/tartu/bathingwater-estonia.geojson
6161
```
6262
</div>
6363
@@ -68,7 +68,7 @@ Let's generate the tiles as the first step using tippecanoe:
6868
cd workshop/exercises
6969
docker run -it --rm -v ${pwd}/data:/data emotionalcities/tippecanoe \
7070
tippecanoe -r1 -pk -pf --output-to-directory=/data/tiles/ --force --maximum-zoom=20 \
71-
--extend-zooms-if-still-dropping --no-tile-compression /data/bathingwater-estonia.geojson
71+
--extend-zooms-if-still-dropping --no-tile-compression /data/tartu/bathingwater-estonia.geojson
7272
```
7373
</div>
7474

@@ -106,7 +106,7 @@ Let's generate the tiles as the first step using tippecanoe:
106106
providers:
107107
- type: feature
108108
name: GeoJSON
109-
data: /data/bathingwater-estonia.geojson
109+
data: /data/tartu/bathingwater-estonia.geojson
110110
id_field: id
111111
- type: tile
112112
name: MVT-tippecanoe
@@ -153,7 +153,7 @@ Edit the `add-data.sh` script on the `ES` folder, adding these two lines before
153153

154154
``` {.yaml linenums="1"}
155155
156-
curl -o /tmp/bathingwater-estonia.geojson https://raw.githubusercontent.com/doublebyte1/diving-into-pygeoapi/tiles-update/workshop/exercises/data/bathingwater-estonia.geojson
156+
curl -o /tmp/bathingwater-estonia.geojson https://raw.githubusercontent.com/geopython/diving-into-pygeoapi/tiles-update/workshop/exercises/data/tartu/bathingwater-estonia.geojson
157157
python3 /load_es_data.py /tmp/bathingwater-estonia.geojson id
158158
159159
```

workshop/exercises/data/README.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This directory provides sample data to demonstrate functionality.
99
- url: https://avaandmed.eesti.ee/datasets/supluskohad
1010
- description: Locations where the Estonian Health Board monitors the bathing water quality
1111
- copyright: [Terviseamet](https://terviseamet.ee)
12-
- license: CC-BY-SA 3.0
12+
- license: CC BY-SA 3.0
1313
- projection: epsg:3300
1414

1515
### Cadastral Parcels Estonia
@@ -24,7 +24,7 @@ This directory provides sample data to demonstrate functionality.
2424
- url: http://opendata.comune.firenze.it/?q=metarepo/datasetinfo&id=52d8d3ab-eae5-400e-8561-d974f8612de0
2525
- description: The dataset contains: acCic_s: Cycle Circulation Area with PolygonZ geometry (class acCic, has two spatial components, acCic_c with PolylineZ ring geometry and acCic_s with PolygonZ geometry). It consists of the longitudinal part of the road reserved for the circulation of cycles. It can be carried out: on its own when it is physically separated from the area reserved for motor vehicles and from that reserved for pedestrians, through suitable traffic dividers placed in the longitudinal direction and impassable; on a reserved lane, obtained from the roadway, separated from the lane reserved for motor vehicles simply by a longitudinal strip or by lane delimiters; on a reserved lane created on the pavement space.
2626
- copyright: Comune di Firenze
27-
- license: CC-BY 4.0
27+
- license: CC BY 4.0
2828

2929
### ICOADS
3030
- title: [coads_sst.nc](coads_sst.nc)
@@ -36,22 +36,43 @@ This directory provides sample data to demonstrate functionality.
3636
## Metadata/Records
3737

3838
### Free Wifi Hotspots in Florence
39-
- title: [free-wifi-florence.xml](./records/xml/free-wifi-florence.xml)
39+
- title: [./firenze/metadata/xml/free-wifi-florence.xml](./firenze/metadata/xml/free-wifi-florence.xml)
4040
- url: https://opendata.comune.fi.it/?q=metarepo/datasetinfo&id=fb5b7bac-bcb0-4326-9388-7e3f3d671d71
4141
- description: The dataset shows the location of the places in the Municipality of Florence where a free wireless internet connection service (Wifi) is available.
4242
- copyright: Comune di Firenze
43-
- license: CC-BY 4.0
43+
- license: CC BY 4.0
4444

4545
### Carsharing spots in Florence
46-
- title: [carsharing-florence.xml](./records/xml/carsharing-florence.xml)
46+
- title: [./firenze/metadata/xml/carsharing-florence.xml](./firenze/metadata/xml/carsharing-florence.xml)
4747
- url: http://dati.cittametropolitana.fi.it/geonetwork/srv/ita/catalog.search#/metadata/cmfi:9c92966b-ae6b-42d4-9729-592b016e4b82
4848
- description: Punctual positioning of the car-sharing activities of the Metropolitan City of Florence.
4949
- copyright: Comune di Firenze
50-
- license: CC-BY 4.0
50+
- license: CC BY 4.0
5151

5252
### German Soil Types
53-
- title: [bodenart.en.csv](bodenart.en.csv)
53+
- title: [./bodenart.en.csv](./bodenart.en.csv)
5454
- url: https://registry.gdi-de.org/codelist/de.bund.thuenen/bodenart/bodenart.en.csv
5555
- description: Bodenarten auf Basis der Bodenkundlichen Kartieranleitung 5. Auflage (KA5)
5656
- copyright: Johann Heinrich von Thünen-Institut
57-
- license: CC-BY 4.0
57+
- license: CC BY 4.0
58+
59+
### Estonia Dams
60+
- title: [./tartu/metadata/xml/estonia-dams.xml](./tartu/metadata/xml/estonia-dams.xml)
61+
- url: https://metadata.geoportaal.ee/geonetwork/srv/eng/catalog.search#/metadata/937c4456-fd9f-40cf-89ba-30be47146858
62+
- description: Eesti paisude ruumiandmekogum koondab andmeid paisude asukohtade, tehniliste parameetrite ja seisundi kohta. Andmeid hallatakse Eesti Looduse Infosüsteemis (EELIS).
63+
- copyright: Keskkonnaagentuur
64+
- license: CC BY-SA 3.0
65+
66+
### Estonia Landcover
67+
- title: [./tartu/metadata/xml/estonia-landcover.xml](./tartu/metadata/xml/estonia-landcover.xml)
68+
- url: https://metadata.geoportaal.ee/geonetwork/srv/eng/catalog.search#/metadata/2cde09a2-ea86-4a73-9768-6c7ba78bc0e6
69+
- description: Eesti maakatte andmebaas. Koostatud ühtse üle-euroopalise Corine Land Cover metoodika alusel. Minimaalne kaardistusühik 25 ha, hierarhiline nomenklatuur IV taset.
70+
- copyright: Keskkonnaagentuur
71+
- license: CC BY-SA 3.0
72+
73+
### Estonia Transport
74+
- title: [./tartu/metadata/xml/estonia-transport.xml](./tartu/metadata/xml/estonia-transport.xml)
75+
- url: https://metadata.geoportaal.ee/geonetwork/srv/eng/catalog.search#/metadata/bf38a8fc-96f1-4d34-9130-18160e489514
76+
- description: Ruumiandmekogum "Eesti topograafia andmekogu - transport" hõlmab Eesti topograafia andmekogu (ETAK) reaalsusmudeli transpordi gruppi koondatud reaalse maailma nähtuseid, mis on klassifitseeritud nähtusklassideks
77+
- copyright: Keskkonnaagentuur
78+
- license: CC BY-SA 3.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)