Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OGC API - Coverages: Propagate selected fields into covjson conversion #1788

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

JamesVarndell
Copy link
Contributor

@JamesVarndell JamesVarndell commented Aug 16, 2024

Overview

This PR fixes a bug which causes coverage collections with an xarray provider to fail to return CoverageJSON responses when a field selection is included in a query.

Related Issue / discussion

#1787

Additional information

THis issue is caused by the fields argument to gen_covjson never being used to subset the fields when building the CoverageJSON. This argument contains the fields which have been selected in the request, and therefore the only fields which exist in the resulting xarray object - so only these fields should be added to the resulting CoverageJSON.

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@tomkralidis tomkralidis self-requested a review August 22, 2024 02:00
@tomkralidis tomkralidis added bug Something isn't working OGC API - Coverages OGC API - Coverages labels Aug 22, 2024
@tomkralidis tomkralidis added this to the 0.18.0 milestone Aug 22, 2024
@tomkralidis tomkralidis merged commit 15be1dc into geopython:master Aug 22, 2024
4 checks passed
@tomkralidis
Copy link
Member

Thanks for the fix @JamesVarndell ! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OGC API - Coverages OGC API - Coverages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants