Skip to content
Draft
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The purpose of these EDR profiles is to constrain the OGC-API EDR standard such

The profiles are meant to be used as described by OGC-API EDR Part 3 (https://github.com/opengeospatial/ogcapi-environmental-data-retrieval/issues/404).


[An experimental guide for how to use the profile](docs.md)

## Status 2025-02-28

The profile for insitu-observations is incomplete, but test implementations and feedback are very much welcome. Also, an OpenAPI 3.1 document of the profile is planned, but does not exist yet.
Expand Down
103 changes: 103 additions & 0 deletions docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Profile documentation

## Profile requirements

All the requirements for the profiles are described in `standard` folder. A complete html document of the profiles can be produced with the command:

```
cd standard
asciidoctor --trace -o rodeo-edr-profile.html index.adoc
```

## OpenAPI

The OpenAPI documents for the profiles can be found in `openapi`folder.

The OpenAPI documents in this repo is based on the documents from https://github.com/opengeospatial/ogcapi-environmental-data-retrieval.

[openapi/edr/oas31](openapi/edr/oas31/) is the openapi documents for the core part of the profile.

[openapi/edr/oas31-insitu-observations](openapi/edr/oas31-insitu-observations) is the openapi documents for the insitu-observations profile.

## Validate your service for compliance

[https://github.com/metno/sedr](https://github.com/metno/sedr) is an experimental validator tool in Python. It will validate the requirements in the profile and some of the requirements from the EDR spec itself.

## Mock service

Start a mock insitu-observations profile service using the OpenAPI document of the profile.

You can use this to get some live examples while implementing your own service.

### Setup on MacOS

```shell
brew install redocly-cli
brew install jq
cd openapi/edr
npm install @stoplight/prism-cli
```

### Setup on Ubuntu

```shell
npm install @redocly/cli@latest
sudo apt-get install jq
cd openapi/edr
npm install @stoplight/prism-cli
```

### Usage
Start mock service:

```shell
cd openapi/edr
redocly bundle ogcapi-edr-rodeo-insitu-observations-oas31.yaml --output insitu-observations-bundle.yaml
prism mock insitu-observations-bundle.yaml
```

Test mock service in another shell:

```shell
curl http://127.0.0.1:4010/collections |jq "."
```

## Vocabularies

The profile mandates usage of various vocabularies to define metadata.

### How to use https://vocab.nerc.ac.uk/

Only the https://vocab.nerc.ac.uk/standard_name/ vocabulary is used currently. Go to that web site to get a list of all the available terms.

### How to use https://www.qudt.org

#### SPARQL search of QUDT

Go to `https://www.qudt.org/fuseki/#/dataset/qudt/query`

Search for units by adding the following to the SPARQL endoint text field:

```
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix qudt: <http://qudt.org/schema/qudt/>


select distinct ?uri ?value ?symbol where {
?uri rdfs:label ?value .
?uri qudt:symbol ?symbol .
?uri rdf:type qudt:Unit .
FILTER (lang(?value)= 'en') .
}
```
Click on the arrow icon to the right.

In the resulting list, use `uri` as value for the `unit.symbol.type` and the `symbol` as value for `observedProperty.symbol.value

### How to specify CRS

A good resource for finding CRSs and the related WKT-definitions are: https://spatialreference.org/.

E.g for OGC:CRS84: https://spatialreference.org/ref/ogc/CRS84/.
4 changes: 4 additions & 0 deletions openapi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package.json
package-lock.json
node_modules

16 changes: 16 additions & 0 deletions openapi/coveragejson/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NOTICE

The content in this folder was originally produced by [Open Geospatial Consortium] (https://www.ogc.org/).

# Original license

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

# Modifications:

- The file coveragejson.json has been modified to be compliant with JSON schema version 2020-12.
- The file coveragejson-insitu-obs-2020-12.json has been modified to be compliant with JSON schema version 2020-12 and to include a complete example of a coveragejson document.
Loading