Skip to main content

No project description provided

Project description

xpublish-edr

PyPI Conda Version

Tests codecov pre-commit.ci status

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

8.2.1 Position query

Query Compliant Comments
coords
z
datetime
parameter-name
crs Requires a CF compliant grid mapping on the target dataset. Default is EPSG:4326
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.

8.2.3 Area query

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
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xpublish_edr-0.3.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

xpublish_edr-0.3.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file xpublish_edr-0.3.0.tar.gz.

File metadata

  • Download URL: xpublish_edr-0.3.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for xpublish_edr-0.3.0.tar.gz
Algorithm Hash digest
SHA256 165d47d57d11d58b4c41340d317992732f8cce7832700f431a9115b753360b3d
MD5 09944de81beb8a7e0e9be6a9cf1f3ecb
BLAKE2b-256 1f9666287c8faa61059e37b55c034bd293c4d71109cc582a94ee56c0fd90095b

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpublish_edr-0.3.0.tar.gz:

Publisher: publish-to-pypi.yml on xpublish-community/xpublish-edr

Attestations:

File details

Details for the file xpublish_edr-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: xpublish_edr-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for xpublish_edr-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3b5ff476802edd7f419cd9dd7fe70f9271018a2e1849cddd80b6cb64118715d
MD5 fcba4457b8f2a8a4a75f207451f1d0fb
BLAKE2b-256 82132aef241a569885d3ef09cc1b71b55bdb87cc32ba57bd0660ef180c808277

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpublish_edr-0.3.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on xpublish-community/xpublish-edr

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page