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

Fixes a rasterio query using format=json and a MemoryFile issue #1824

Merged

Conversation

Alex-NRCan
Copy link
Contributor

@Alex-NRCan Alex-NRCan commented Oct 2, 2024

Overview

There is an issue when writing the raster data with the MemoryFile.
The issue is present in the demo and can be tested easily with a query such as this one:
https://demo.pygeoapi.io/master/collections/gdps-temperature/coverage?f=json&lang=en-US&bbox=-118,52,-116,54

This fix (more an optimization) changes the code to not work with a MemoryFile at all (doesn't need to) when the queried format is json.

Note, the MemoryFile is still being used when format isn't json.

Related Issue / discussion

Additional information

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

@Alex-NRCan Alex-NRCan changed the title Fixes a MemoryFile issue with rasterio Fixes a rasterio query using format=json and a MemoryFile issue Oct 2, 2024
@tomkralidis tomkralidis self-requested a review October 3, 2024 10:29
@tomkralidis tomkralidis added this to the 0.19.0 milestone Oct 3, 2024
@tomkralidis
Copy link
Member

@Alex-NRCan thanks for this. Can you fill in/checkoff the appropriate areas in the pull request text?

@Alex-NRCan
Copy link
Contributor Author

Ok, I think I checked off the boxes now 👍

@tomkralidis tomkralidis added OGC API - Coverages OGC API - Coverages enhancement New feature or request labels Oct 3, 2024
@tomkralidis tomkralidis merged commit 179c90f into geopython:master Oct 3, 2024
4 checks passed
@Alex-NRCan Alex-NRCan deleted the fix-rasterio branch October 3, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OGC API - Coverages OGC API - Coverages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants