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}/query
. This is because of the path structure of xpublish.
In the future, when xpublish
supports DataTree
it will provide a path to supporting the spec compliant collections
resource path.
Supported Queries
Query | Compliant | Comments |
---|---|---|
coords |
✅ | |
z |
✅ | |
datetime |
✅ | |
parameter-name |
✅ | |
crs |
❌ | Not currently supported, all coordinates should be in the reference system of the queried dataset |
parameter-name |
✅ | |
f |
✅ | |
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 |
❌ | Not currently supported, all coordinates should be in the reference system of the queried dataset |
parameter-name |
✅ | |
f |
✅ | |
method |
➕ | Optional: controls data selection. Use "nearest" for nearest neighbor selection, or "linear" for interpolated selection. Uses nearest if not specified |
method
is 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.
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
Hashes for xpublish_edr-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1db5f3c3546e4a0fbb2ffbeb910906893c33eb726abbfd56bee2f5c11c915ba8 |
|
MD5 | 6ca121ace832df64e5b3d797609aa47a |
|
BLAKE2b-256 | d8b9fcfb0cb1c029d858ff15866c865e6b442148f2fc0228c1d05712348bc2ab |