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

pygeoapi as a codelist registry #906

Closed
pvgenuchten opened this issue May 20, 2022 · 6 comments
Closed

pygeoapi as a codelist registry #906

pvgenuchten opened this issue May 20, 2022 · 6 comments
Labels
enhancement New feature or request stale Issue marked stale by stale-bot

Comments

@pvgenuchten
Copy link
Contributor

In the European Soil Community we're in the process of setting up a tool chain of tools to support our data workflows. For one aspect we're still looking for a good technical option. It is the publication of Codelists. In many cases common codelists are imported and extended to support a local use case, these extended codelists would need to be published in a simple method.

There are common tools for this task, such as:

  • Skosmos (requires a sparql endpoint)
  • Re3gistry (requires SOLR)
  • GeoNetwork

Each of them a bit too hard to setup and manage

Some codelists actually have a geometry (consider a list of countries/regions/nature area's, etc), many do not. Still it would be interesting to publish every concept in a list as a feature in an OGC-API Features endpoint (do features need to have a geometry?).

I guess I would need to define a postgres/sqlite structure for codelists, to be consumed by one of the pygeoapi data providers.

A nice to have would be to have the json-ld be encoded using the SKOS ontology, which i think is possible with the current ld tooling.

An aspect of codelists is that they are usually nested (World-Africa-Nigeria-Lagos-Makoko). I wonder if pygeoapi has a mechanism for this. Concepts typically have sameAs, narrower, wider links to other concepts, I guess this can be managed in the link section.

@ksonda
Copy link
Contributor

ksonda commented May 23, 2022

We have an open PR to allow for arbitrary JSON-LD templating that may be useful for this use case as well. #868

@pvgenuchten
Copy link
Contributor Author

@ksonda, i tried your pr branch, but it was not clear how i could populate those json-ld templates, do you have some examples?

@ksonda
Copy link
Contributor

ksonda commented May 24, 2022

You can see an example json-ld document here: https://reference.geoconnex.us/collections/gages/items/1000437?f=jsonld

This is generated by this template https://github.com/internetofwater/geoconnex.us/blob/master/pygeoapi/pygeoapi-skin-dashboard/templates/jsonld/ref-gages.jsonld

The template is a jinja template, that can map data fields like so:

"hyf:interpolative": {{ data.nhdpv2_REACH_measure }} , where nhdpv2_REACH_measure is a field in the data

The template is placed in a folder called jsonld within the templates directory (as set in the server config yaml)

Then, the template can be set at the collection level:
image

@pvgenuchten
Copy link
Contributor Author

I'm going to give it a try, we should add such an example to docs

Copy link

As per RFC4, this Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

@github-actions github-actions bot added the stale Issue marked stale by stale-bot label Mar 10, 2024
Copy link

As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Issue marked stale by stale-bot
Projects
None yet
Development

No branches or pull requests

2 participants