An OGC API EDR implementation using SQL for pygeoapi
Project description
pygeoapi Environmental Data Retrieval
This repository contains SQL pygeoapi providers for OGC API - Environmental Data Retrieval (EDR).
OGC API - EDR
The configuration for SQL OGC API - EDR follows that of pygeoapi for OGC API - Features, with the addition of two sections edr_fields and external_tables.
For more detailed documentation on the creation of a pygeoapi configuration file, refer
to the docs.
The edr_fields section defines the columns of your SQL table and their corresponding field in OGC API - EDR.
The external_tables section allows foriegn table joins to allow edr_fields to refer to any table/column with a mapped relationship to the primary table.
Postgres
The configuration for Postgres EDR is as follows:
- type: edr
name: pg_edr.edr.PostgresEDRProvider
data: # Same as PostgresSQLProvider
host: ${POSTGRES_HOST}
dbname: ${POSTGRES_DB}
user: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
search_path: [capture]
table: waterservices_daily
edr_fields: # Required EDR Fields
id_field: id # Result identifier field
geom_field: geometry # Result identifier field
time_field: time # Result time field
location_field: monitoring_location_id # Result location identifier field
result_field: value # Result value field
parameter_id: parameter_code # Result parameter id field
parameter_name: waterservices_timeseries_metadata.parameter_name # Result parameter name field
parameter_unit: unit_of_measure # Result parameter unit field
external_tables: # Additional table joins
waterservices_timeseries_metadata: # JOIN waterservices_timeseries_metadata ON waterservices_daily.parameter_code=waterservices_timeseries_metadata.parameter_code
foreign: parameter_code
remote: parameter_code
MySQL
The configuration for MySQL EDR is as follows:
- type: edr
name: pg_edr.edr.MySQLEDRProvider
data: # Same as MySQLProvider
host: ${MYSQL_HOST}
port: ${MYSQL_PORT}
dbname: ${MYSQL_DATABASE}
user: ${MYSQL_USER}
password: ${MYSQL_PASSWORD}
search_path: [${MYSQL_DATABASE}]
table: landing_observations
edr_fields: # Required EDR Fields
id_field: id
geom_field: airports.airport_locations.geometry_wkt
time_field: time
location_field: location_id
result_field: value
parameter_id: parameter_id
parameter_name: airport_parameters.name
parameter_unit: airport_parameters.units
external_tables: # Additional table joins
airports: # JOIN airports ON landing_observations.location_id=airports.code
foreign: location_id
remote: code
airports.airport_locations: # JOIN airport_locations ON airports.code=airport_locations.id
foreign: code
remote: id
airport_parameters: # JOIN airport_parameters ON landing_observations.parameter_id=airport_parameters.id
foreign: parameter_id
remote: id
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgedr-0.1.0.tar.gz.
File metadata
- Download URL: pgedr-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90d86767c3835f486bf24c98aeaaa453d26be5950a2c0b6a58aa1db05217a20e
|
|
| MD5 |
9c718938f8b90074ad5fca665a2e8dcb
|
|
| BLAKE2b-256 |
d490249c1d1a2291148cacdb32694344ef977cba25de5b4cc9317f31530deac7
|
Provenance
The following attestation bundles were made for pgedr-0.1.0.tar.gz:
Publisher:
pypi.yml on internetofwater/pgedr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgedr-0.1.0.tar.gz -
Subject digest:
90d86767c3835f486bf24c98aeaaa453d26be5950a2c0b6a58aa1db05217a20e - Sigstore transparency entry: 357897211
- Sigstore integration time:
-
Permalink:
internetofwater/pgedr@171c4b1bc61f419e2b69565fdc6299ee2cdbb423 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/internetofwater
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@171c4b1bc61f419e2b69565fdc6299ee2cdbb423 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pgedr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pgedr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eea5119727fd167fb0e129b3194113bfb0b64d576887a124014e5e6c829f82c4
|
|
| MD5 |
a9ccb2090673ea63bd49920f513cd8ed
|
|
| BLAKE2b-256 |
5fa7553692a3731483a99f7c4b397390e0c4c29d439bdf11cff070d66a1df1d1
|
Provenance
The following attestation bundles were made for pgedr-0.1.0-py3-none-any.whl:
Publisher:
pypi.yml on internetofwater/pgedr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgedr-0.1.0-py3-none-any.whl -
Subject digest:
eea5119727fd167fb0e129b3194113bfb0b64d576887a124014e5e6c829f82c4 - Sigstore transparency entry: 357897225
- Sigstore integration time:
-
Permalink:
internetofwater/pgedr@171c4b1bc61f419e2b69565fdc6299ee2cdbb423 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/internetofwater
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@171c4b1bc61f419e2b69565fdc6299ee2cdbb423 -
Trigger Event:
release
-
Statement type: