Proposal: fill the remaining `xarray-edr` query types (radius, area, instances, trajectory, corridor) — volunteer effort
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with RFC4, pygeoapi/provider/xarray_edr.py, the BaseEDRProvider methods, and get_collection_edr_instances; compare the provider matrix and EDR 1.0.1 requirements. The proposal spans a base API bug, shared parsing and sampling, and five query types, so agree the design and split the work into small PRs. Done means each accepted query type has tests, its docs matrix cell, and the matching conformance declaration.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
The xarray-edr provider serves position and cube only. The provider matrix says so and pygeoapi/provider/xarray_edr.py at master 0b38380 matches it. Radius, area, instances, trajectory and corridor — all defined in EDR 1.0.1 — are not available over gridded NetCDF/Zarr data, so a client needing conditions along a route or within a corridor has no stock pygeoapi it can point at. I've searched open issues and PRs for the five types and found none; please point me at anything I've missed.
I have a maritime use for trajectory and corridor queries over gridded fields and would rather build them upstream than in a fork. This is volunteered effort on my own time; I'm opening the issue first, per RFC4, to confirm the direction suits the project and agree a few design points before writing code.
There is also a bug in the path these would use. BaseEDRProvider.instances() and instance(id) both return NotImplementedError() rather than raise. get_collection_edr_instances tests instance(id) for truthiness, so a provider inheriting the default accepts any id, including nonsense; and it iterates instances(), which on the default is an exception object and surfaces as a 500. A False from instance() leaves instances unassigned.
Describe the solution you'd like
A sequence of small PRs, one query type each, with tests, the docs matrix cell and the conformance declaration in the same change:
- Instances bug fix — small and separate, before anything else: base methods raising
ProviderItemNotFoundError(the only exception that path catches) and the API handling the not-found branch. - Foundations — shared WKT parsing for
LINESTRING Z/M/ZMandPOLYGON, z/datetime resolution against the dataset's own axes, a CoverageJSON helper for trajectory-shaped output. No new query type. - Radius —
within,within-units, great-circle buffer. - Area — polygon mask, with a dateline test.
- Instances — the
xarray-edrimplementation of the existing contract. - Trajectory — 2D/3D/4D. Each vertex is sampled at its own time when M is present (seconds since the Unix epoch), or at the
datetimeparameter otherwise. For M anddatetimeboth present, clause 8.2.5 of EDR 1.2 says an error shall be thrown, though that clause is marked informative — I'd return 400 either way rather than silently prefer one; the normative wording is in A.5.9 (/req/edr/linestring-coords-response). - Corridor —
corridor-width/-height,width-units/height-units,resolution-x/-z.
Trajectory depends only on step 1, so it needn't wait on instances. Query-type registration moved to BaseEDRProvider.__init_subclass__ in #2049, so each added type registers itself by method name without touching the API layer.
Design points I'd like a steer on:
- Sampling. Nearest-neighbour throughout, matching current position behaviour. EDR defines no interpolation parameter, so anything else would be an invention; I'd leave it for a later discussion if there's appetite.
- Instances contract. With the bug fixed, the API layer already routes
/collections/{id}/instances/{instanceId}/...and the two base methods are the whole provider contract; my question is howxarray-edrshould implement them — a configured dimension name (e.g. forecast reference time) seems the obvious shape. - Corridor. Cross-section orientation at a bend is left open by the spec; I'd document the choice in the provider docs and take direction if the project has a preferred reading.
- Target version. pygeoapi declares
ogcapi-edr-1/1.0/conf/coreand is a certified reference implementation at 1.0.1. Every query type here exists in 1.0.1, so I'd stay on that declaration and not touch conformance URIs. EDR 1.2 landed on 2026-09-08; whether and when to move is a separate discussion I'm not proposing to open here. - Process. This issue plus PRs, or would the PSC prefer an RFC?
What I'll bring:
- Tests before implementation.
- 4xx responses that say which parameter or option isn't supported, rather than a silent empty result.
- CITE run against each added conformance class where a suite exists for the target version; where it doesn't yet, the abstract test suite in Annex B as a checklist.
- An independent client with known ground truth to exercise the branch beyond what unit tests catch.
- I intend to stand up a public deployment of the result for the live-deployments page.
- I'll stay on as point of contact for these code paths after they merge.
Describe alternatives you've considered
- Port the NWS fork. The NWS EDR-API demonstrated the full set against xarray from an early pygeoapi fork; it hasn't been upstreamed yet. It has diverged too far to merge, so I'd read it for lessons rather than port it.
- A community provider plugin out of tree. Workable, and my fallback if this isn't wanted in core — but it would leave the matrix as it is for everyone else, and upstream is my preference.
- Another server with broader EDR coverage (FMI SmartMet, KNMI ADAGUC). Both are whole product servers over their own engines rather than something to add to an existing pygeoapi deployment.
Additional context
The hash above is accurate as of posting and will drift with the next merge. Happy to split this into one issue per PR if that suits triage better.
- Ngôn ngữ chính
- Python
- Star
- 626
- Fork
- 339
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của geopython/pygeoapi
-
Make HTML-Escaping optionalĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
the query parameter limit is not working for jobsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor flask/starlette/django testingCó thể đã có người làm @tomkralidis đã nhận hôm nay. Đang mởenhancement tests
geopython/pygeoapi#2468 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ESRI provider tests: mock ArcGIS HTTP responses instead of depending on sampleserver6Có thể làm lại được @aaditya755 đã nhận 7 ngày trước và không có pull request nào đang mở. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
geopython/pygeoapi#2448 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của geopython/pygeoapi
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
pydot/pydot#601 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
letsencrypt/cp-cps#361 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
CI: startup_failure because callers grant fewer permissions than ledger-app-workflows@v1 declaresCó thể đã có người làm @maykonmichel đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
LedgerHQ/app-boilerplate-rust#227 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
linuxmint/mintupdate#1107 ·