Skip to content

Fix NoData values for Coverage JSON output #2068

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

geographika
Copy link
Contributor

Overview

As seen during the Diving into pygeoapi workshop the JSON coverage output was broken due to NaN values in the output.

error

This PR ensures NaN are converted to Python None values, which are then converted to null values in the JSON output, using the same approach as in the xarray driver - https://github.com/geopython/pygeoapi/blob/master/pygeoapi/provider/xarray_.py#L395-L398

image

Dependency policy (RFC2)

  • [X ] I have ensured that this PR meets RFC2 requirements

Contributions and licensing

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

  • I'd like to contribute this bugfix 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 July 20, 2025 09:25
@tomkralidis tomkralidis added this to the 0.21.0 milestone Jul 20, 2025
@tomkralidis tomkralidis added bug Something isn't working OGC API - Coverages OGC API - Coverages labels Jul 20, 2025
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