Skip to content

Commit

Permalink
this introduces an estonian dataset, and removes some of the kosovo data
Browse files Browse the repository at this point in the history
creating the PR now, to understand if the cc-by-sa license of this data may be problematic to the mit license? what is your view on that?
  • Loading branch information
pvgenuchten committed Apr 5, 2024
1 parent f46c523 commit e02b2eb
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4,662 deletions.
64 changes: 33 additions & 31 deletions workshop/content/docs/publishing/first.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ title: Exercise 1 - Your first dataset

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

For this exercise, we will use a CSV dataset of [Points of interest in Kosovo](https://github.com/geopython/diving-into-pygeoapi/blob/main/workshop/exercises/data/osm_poi_kosovo.csv),
kindly provided by [Open Street Map Community and GeoFabrik](https://download.geofabrik.de/europe/kosovo.html).
For this exercise, we will use a CSV dataset of [Bathing waters in Estonia](bathingwater-estonia.csv),
kindly provided by [Estonian Health Board](https://terviseamet.ee).

You can find this dataset in `workshop/exercises/data/osm_poi_kosovo.csv`.
You can find this dataset in `workshop/exercises/data/bathingwater-estonia.csv`.

This exercise consists of two key steps:
This exercise consists of two steps:

* adapt `workshop/exercises/pygeoapi.config.yml` to define this dataset as an OGC API - Features *collection*
* adjust `workshop/exercises/pygeoapi.config.yml` to define this dataset as an OGC API - Features *collection*
* ensure that pygeoapi can find and connect to the data file

We will use the `workshop/exercises/docker-compose.yml` file provided.
Expand Down Expand Up @@ -70,38 +70,40 @@ Make sure that the indentation aligns (hint: directly under `# START ...`)
The config section reads:

``` {.yml linenums="185"}
poi_kosovo:
type: collection
title: Points of Interest Kosovo
description: The dataset shows the location of the places of interest in Kosovo.
keywords:
- places of interest
- kosovo
links:
- type: text/csv
rel: canonical
title: data
href: https://download.geofabrik.de/europe/kosovo.html
hreflang: AL
extents:
spatial:
bbox: [20,41.9,21.7,43.2]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: feature
name: CSV
data: /data/osm_poi_kosovo.csv
id_field: osm_id
geometry:
x_field: x
y_field: y
Bathing_Water_Estonia:
type: collection
title: Bathing Water Estonia
description: Locations where the Estonian Health Board monitors the bathing water quality
keywords:
- bathing water
- estonia
links:
- type: text/csv
rel: canonical
title: data
href: https://avaandmed.eesti.ee/datasets/joogiveeallikad
hreflang: EE
extents:
spatial:
bbox: [20,57,29,60]
crs: http://www.opengis.net/def/crs/EPSG/0/4326
providers:
- type: feature
name: CSV
data: /data/bathingwater-estonia.csv
id_field: id
title_field: Name
geometry:
x_field: x
y_field: y
storage_crs: http://www.opengis.net/def/crs/EPSG/0/3300
```

The most relevant part is the `providers` section. Here, we define a `CSV Provider`,
pointing the file path to the `/data` directory we will mount (see next) from the local
directory into the Docker container above. Because a CSV is not a spatial file, we explicitly
configure pygeoapi so that the longitude and latitude (x and y) is mapped from the columns `lon`
and `lat` in the CSV file.
and `lat` in the CSV file. Notice the `storage_crs` parameter, which indicates the coordinate system which is used in the source data.

!!! Tip

Expand Down
13 changes: 7 additions & 6 deletions workshop/exercises/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ This directory provides sample data to demonstrate functionality.

## Sources

### OSM POI Kosovo
- title: [osm_poi_kosovo.csv](osm_poi_kosovo.csv)
- url: https://download.geofabrik.de/europe/kosovo.html
- description: Data coverted to csv from kosovo-latest-free.shp.zip. The file was last modified 23-6-2023
- copyright: OSM Contributors
- license: ODbL
### Bathingwater Estonia
- title: [Supluskohad](./bathingwater-estonia.csv) (Bathing places)
- url: https://avaandmed.eesti.ee/datasets/joogiveeallikad
- description: Locations where the Estonian Health Board monitors the bathing water quality
- copyright: [Terviseamet](https://terviseamet.ee)
- license: CC-BY-SA 3.0
- projection: epsg:3300

### Places Kosovo
- title: [osm_places_kosovo.gpkg](./osm_places_kosovo.gpkg)
Expand Down
Loading

0 comments on commit e02b2eb

Please sign in to comment.