Skip to content

Commit

Permalink
Add SensorThings API EDR Provider (#1928)
Browse files Browse the repository at this point in the history
* Port SensorthingsEDR provider

* Fix flake8

* Respond to PR feedback

* Implement PR feedback

* Remove noqa lines

Formate STA EDR provider such that it does not require #noqa to pass CI

* Fix CoverageJSON capitalization
  • Loading branch information
webb-ben authored Feb 17, 2025
1 parent d809647 commit d7c7122
Show file tree
Hide file tree
Showing 5 changed files with 882 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
pytest tests/test_parquet_provider.py
pytest tests/test_postgresql_provider.py
pytest tests/test_rasterio_provider.py
pytest tests/test_sensorthings_edr_provider.py
pytest tests/test_sensorthings_provider.py
pytest tests/test_socrata_provider.py
# pytest tests/test_socrata_provider_live.py.py # NOTE: these are skipped in the file but listed here for completeness
Expand Down
35 changes: 34 additions & 1 deletion docs/source/data-publishing/ogcapi-edr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@ Providers
---------

pygeoapi core EDR providers are listed below, along with a matrix of supported query
parameters.
types and query arguments.

.. csv-table::
:header: Provider, Position, Radius, Area, Cube, Trajectory, Corridor, Items, Locations, Instances
:align: left

`xarray-edr`_,✅,❌,❌,✅,❌,❌,❌,❌,❌
`SensorThingsEDR`_,❌,❌,✅,✅,❌,❌,✅,✅,❌


.. csv-table::
:header: Provider, coords, parameter-name, datetime
:align: left

`xarray-edr`_,✅,✅,✅
`SensorThingsEDR`_,✅,✅,✅


Below are specific connection examples based on supported providers.
Expand Down Expand Up @@ -90,6 +99,30 @@ The `xarray-edr`_ provider plugin reads and extracts `NetCDF`_ and `Zarr`_ data
`pyproj.CRS.from_user_input`_.


SensorThingsEDR
^^^^^^^^^^^^^^^

The SensorThings API EDR Provider for pygeaopi extends the feature provider to
produce CoverageJSON representations from SensorThings responses repsonses. This provider
relies on using the ObservedProperty Entity to create the `parameter-name` set.

.. code-block:: yaml
providers:
- type: edr
name: SensorThingsEDR
data: https://emotional.byteroad.net/FROST-Server/v1.1/
- type: feature
name: SensorThings
data: https://emotional.byteroad.net/FROST-Server/v1.1/Things
title_field: name
.. note::
The `feature` provider must also be configured to service the `.../items`
EDR query type.


Data access examples
--------------------

Expand Down
1 change: 1 addition & 0 deletions pygeoapi/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
'PostgreSQL': 'pygeoapi.provider.postgresql.PostgreSQLProvider',
'rasterio': 'pygeoapi.provider.rasterio_.RasterioProvider',
'SensorThings': 'pygeoapi.provider.sensorthings.SensorThingsProvider',
'SensorThingsEDR': 'pygeoapi.provider.sensorthings_edr.SensorThingsEDRProvider', # noqa: E501
'SQLiteGPKG': 'pygeoapi.provider.sqlite.SQLiteGPKGProvider',
'Socrata': 'pygeoapi.provider.socrata.SODAServiceProvider',
'TinyDB': 'pygeoapi.provider.tinydb_.TinyDBProvider',
Expand Down
Loading

0 comments on commit d7c7122

Please sign in to comment.