No project description provided
Project description
xpublish-edr
Xpublish routers for the OGC EDR API.
Documentation and code
URLs for the docs and code.
Installation
For conda users you can
conda install --channel conda-forge xpublish_edr
or, if you are a pip users
pip install xpublish_edr
Example
import xarray as xr
import xpublish
from xpublish.routers import base_router, zarr_router
from xpublish_edr.cf_edr_router import cf_edr_router
ds = xr.open_dataset("dataset.nc")
rest = xpublish.Rest(
datasets,
routers=[
(base_router, {"tags": ["info"]}),
(cf_edr_router, {"tags": ["edr"], "prefix": "/edr"}),
(zarr_router, {"tags": ["zarr"], "prefix": "/zarr"}),
],
)
OGC EDR Spec Compliance
This package attempts to follow the spec where reasonable, adding functionality where the value is demonstrable.
collections and Resource Paths Support
xpublish-edr does not currently support the /collections/{collectionId}/query path template described in the spec. Instead the path resource appears as /{dataset_id}/edr/{query}. This is because of the path structure of xpublish. In the future, if xpublish supports DataTree it could provide a path to supporting the spec compliant collections resource path.
However, despite the collections resource not existing, this implementation supports collection metadata at the dataset level through the /{dataset_id}/edr/ resource.
Supported Queries
| Query | Compliant | Comments |
|---|---|---|
coords |
✅ | |
z |
✅ | |
datetime |
✅ | |
parameter-name |
✅ | |
crs |
✅ | Requires a CF compliant grid mapping on the target dataset. Default is EPSG:4326 |
f |
✅ | Supports cf_covjson, csv, geojson netcdf, parquet |
method |
➕ | Optional: controls data selection. Use "nearest" for nearest neighbor selection, or "linear" for interpolated selection. Uses nearest if not specified |
Any additional query parameters are assumed to be additional selections to make on the dimensions/coordinates. These queries will use the specified selections
method.
| Query | Compliant | Comments |
|---|---|---|
coords |
✅ | Only POLYGON supported currently |
z |
✅ | |
datetime |
✅ | |
parameter-name |
✅ | |
crs |
✅ | Requires a CF compliant grid mapping on the target dataset. Default is EPSG:4326 |
f |
✅ | Supports cf_covjson, csv, geojson netcdf, parquet |
method |
➕ | Optional: controls data selection. Use "nearest" for nearest neighbor selection, or "linear" for interpolated selection. Uses nearest if not specified |
methodis not applicable for the coordinates of area queries, only for selecting datetime, z, or additional dimensions.
For POLYGON coordinates, points that are located within OR on the polygons boundary are included in the response.
| Query | Compliant | Comments |
|---|---|---|
bbox |
✅ | Bounding box in minx,miny,maxx,maxy format |
z |
✅ | |
datetime |
✅ | |
parameter-name |
✅ | |
crs |
✅ | Requires a CF compliant grid mapping on the target dataset. Default is EPSG:4326 |
f |
✅ | Supports cf_covjson, csv, geojson netcdf, parquet, geotiff |
method |
➕ | Optional: controls data selection. Use "nearest" for nearest neighbor selection, or "linear" for interpolated selection. Uses nearest if not specified |
methodis not applicable for the coordinates of cube queries, only for selecting datetime, z, or additional dimensions.
Cube queries are not flattened like area queries, so the response is returned as sliced by xarray. This is particularly useful for subsetting regular grids.
Get in touch
Report bugs, suggest features or view the source code on GitHub.
License and copyright
xpublish-edr is licensed under BSD 3-Clause "New" or "Revised" License (BSD-3-Clause).
Development occurs on GitHub at https://github.com/gulfofmaine/xpublish-edr/issues.
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 xpublish_edr-0.9.1.tar.gz.
File metadata
- Download URL: xpublish_edr-0.9.1.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18bb9c25044778c8b829fb72d007a69206590280f23ac2318f435ddd1fc8d378
|
|
| MD5 |
0173b8a14836868d707456c568d74f1c
|
|
| BLAKE2b-256 |
4e4f6cb97e61b3f8f3f4996125fe906871af469c0463cf8639b21a896e1e85ee
|
Provenance
The following attestation bundles were made for xpublish_edr-0.9.1.tar.gz:
Publisher:
publish-to-pypi.yml on xpublish-community/xpublish-edr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpublish_edr-0.9.1.tar.gz -
Subject digest:
18bb9c25044778c8b829fb72d007a69206590280f23ac2318f435ddd1fc8d378 - Sigstore transparency entry: 847790227
- Sigstore integration time:
-
Permalink:
xpublish-community/xpublish-edr@91731a6881f6d8ca24cff40691f1360a4d27e031 -
Branch / Tag:
refs/tags/0.9.1 - Owner: https://github.com/xpublish-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@91731a6881f6d8ca24cff40691f1360a4d27e031 -
Trigger Event:
release
-
Statement type:
File details
Details for the file xpublish_edr-0.9.1-py3-none-any.whl.
File metadata
- Download URL: xpublish_edr-0.9.1-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baac6aa1021c075031784e50d37ff59a47ac3bfab7622641c650da547dc8df2a
|
|
| MD5 |
2bd9e66e6a33535e6e593399731b6ffd
|
|
| BLAKE2b-256 |
36469ea3b6c4c8c76e6e25b906b4af51d8bd754debff39ef073016b8f13a2c8a
|
Provenance
The following attestation bundles were made for xpublish_edr-0.9.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on xpublish-community/xpublish-edr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpublish_edr-0.9.1-py3-none-any.whl -
Subject digest:
baac6aa1021c075031784e50d37ff59a47ac3bfab7622641c650da547dc8df2a - Sigstore transparency entry: 847790287
- Sigstore integration time:
-
Permalink:
xpublish-community/xpublish-edr@91731a6881f6d8ca24cff40691f1360a4d27e031 -
Branch / Tag:
refs/tags/0.9.1 - Owner: https://github.com/xpublish-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@91731a6881f6d8ca24cff40691f1360a4d27e031 -
Trigger Event:
release
-
Statement type: