Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Guama River to to vector features #188

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions workshop/content/docs/publishing/ogcapi-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,46 +38,45 @@ vector data source.
It may be helpful to open the dataset in [QGIS](https://qgis.org) while adding and updating your pygeoapi server to easily evaluate table attributes, names, spatial properties and CRS.


Let's add the file `workshop/exercises/data/tartu/cp-tartu2.gpkg.zip`:
Let's add the file `workshop/exercises/data/brazil/guama_river.gpkg.zip`:

!!! question "Update the pygeoapi configuration"

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`.
First, let's unzip the file [guama_river.gpkg.zip](https://github.com/geopython/diving-into-pygeoapi/tree/main/workshop/exercises/data/brazil/guama_river.gpkg.zip) to `guama_river.gpkg`.

Then, open the pygeoapi configuration file in a text editor.
Find the line `# START - EXERCISE 2 - cadastral parcels Tartu`.
Find the line `# START - EXERCISE 2 - flowlines Guama River`.

Add a new dataset section by uncommenting the lines up to `# END - EXERCISE 2 - cadastral parcels Tartu`:

``` {.yaml linenums="1"}
cp-tartu:
guama-river:
type: collection
title: Tartu Cadastral Parcels
description: Cadastral parcels in downtown Tartu
title: Guama River
description: Guama River Basin mainstem flowlines
keywords:
- Cadastral parcels
- Tartu
- Guama River
- Merit Hydro
links:
- type: OGC/WFS
- type: text/html
rel: canonical
title: data
href: https://metadata.geoportaal.ee/geonetwork/srv/metadata/9949ec81-f758-42e6-9c1c-6fb604a3f053
href: https://www.sciencebase.gov/catalog/item/614a8864d34e0df5fb97572d
hreflang: EE
extents:
spatial:
bbox: [26.6, 58.3, 26.8, 58.5]
bbox: [-49.16, -5.0, -46.8, -1.2]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: feature
name: SQLiteGPKG
data: /data/tartu/cptartu2.gpkg # place correct path here
id_field: nationalca
title_field: label
table: cptartu2 # table name within gpkg
data: /data/brazil/guama_river.gpkg # place correct path here
id_field: fid
table: guama_river # table name within gpkg
```

Save the file and restart Docker Compose. Navigate to <http://localhost:5000/collections> to evaluate whether the new dataset with
title *"Tartu Cadastral Parcels"* has been published.
title *"Guama River"* has been published.

!!! note

Expand Down
Binary file not shown.
51 changes: 25 additions & 26 deletions workshop/exercises/pygeoapi.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,32 +226,31 @@ resources:
# storage_crs: http://www.opengis.net/def/crs/EPSG/0/3300
### END - EXERCISE 1 - Your First Collection

## START - EXERCISE 2 - cadastral parcels Tartu
# cp-tartu:
# type: collection
# title: Tartu Cadastral Parcels
# description: Cadastral parcels in downtown Tartu
# keywords:
# - Cadastral parcels
# - Tartu
# links:
# - type: OGC/WFS
# rel: canonical
# title: data
# href: https://metadata.geoportaal.ee/geonetwork/srv/metadata/9949ec81-f758-42e6-9c1c-6fb604a3f053
# hreflang: EE
# extents:
# spatial:
# bbox: [26.6, 58.3, 26.8, 58.5]
# crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
# providers:
# - type: feature
# name: SQLiteGPKG
# data: /data/tartu/cptartu2.gpkg # place correct path here
# id_field: nationalca
# title_field: label
# table: cptartu2 # table name within gpkg
## END - EXERCISE 2 - cadastral parcels Tartu
## START - EXERCISE 2 - Guama River mainstems
# guama-river:
# type: collection
# title: Guama River
# description: Guama River Basin mainstem flowlines
# keywords:
# - Guama River
# - Merit Hydro
# links:
# - type: text/html
# rel: canonical
# title: data
# href: https://www.sciencebase.gov/catalog/item/614a8864d34e0df5fb97572d
# hreflang: EE
# extents:
# spatial:
# bbox: [49.16,-5.0, -46.8, -1.2]
# crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
# providers:
# - type: feature
# name: SQLiteGPKG
# data: /data/brazil/guama_river.gpkg # place correct path here
# id_field: fid
# table: guama_river # table name within gpkg
## END - EXERCISE 2 - Guama River mainstems

## START - EXERCISE 3 - Coverages
# tartu-ntl:
Expand Down
Loading