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

xcube WCS #780

Draft
wants to merge 53 commits into
base: main
Choose a base branch
from
Draft

xcube WCS #780

wants to merge 53 commits into from

Conversation

thomasstorm
Copy link
Contributor

  • (X) Replace usage of xcube.core.gen2 by Common tile computation #739. This will fix many of the issues listed below as this is a threadsave and scalable approach to fetching data.
  • Add tiles API requirement
  • Adapt to xcube coding style: always pass kwargs with keyword rather than position
  • Include a dataset's bounding box in DescribeCoverage operation.
  • Recognize WIDTH, HEIGHT and RESX, RESY (opt. DEPTH and RESZ) that are mandatory if INTERPOLATION is not "none". Currently, only BBOX is used, sell also displacement in screenshot below.
  • Clarify meaning of gml:CodeListType for formats in capabilities XSD.
  • Get rid of class xcube.webapi.ows.wcs.controllers.CoverageRequest (as it is no more than a wrapper of the query)
  • Fix unit tests (mostly broken due to changes in reported capabilities).

Work items done:

  • Fix extra WCS service metadata entries in server config, e.g., move into config.py with defaults as code constants
  • Configuration of WCS keywordsmetadata shall not be mandatory
  • Auto-close temp files in context manager
  • Raise ApiError.BadRequest if request validation fails
  • Refactor operation GET /wcs/kvp - is is too long and barely maintainable this way
  • Adapt to xcube coding style: always import only single item from dep or own package
  • Also variable titles should include the dataset name, otherwise they are indistinguishable in , e.g., QGIS
  • Include supportedInterpolations in DescribeCoverage operation.
  • Make TIME optional as not all datasets have a time dimension.

Work item potentially obsolete after (X) has been done.:

  • The way the dataset paths are parsed from datasets_ctx.get_dataset_configs() is correct only for edge cases (namely, only for filesystem data stores). We must generalize this, i.e., allow for reusing the dataset configurations from xcube server directly in xcube cube generator requests of xcube.core.gen2.
  • Remove tiles API requirement
  • Fix tornado.iostream.StreamClosedError: Stream is closed issue (likely reason: temporary file removed before Tornado finishes request)
  • Opt: allow using in-memory file I/O to avoid temporary files entirely as they likely produce problems
  • Fix root cause of datasets' history global attribute not being JSON-serializable (set by xcube Generator)
  • Fix KeyError: Timestamp('2017-01-25 09:35:51') raised by pandas
  • Fix TypeError: unsupported format string passed to NoneType.__format__ after cube generation (message=f'Cube generated successfully')
  • Fix xcube.core.store.error.DataStoreError: Failed to open dataset './demo.conc_chl.zarr': group not found at path ''

image

Typical QGIS request:

GET /wcs/kvp? 
  service=WCS
  &version=1.0.0
  &request=GetCoverage
  &SERVICE=WCS
  &VERSION=1.0.0
  &REQUEST=GetCoverage
  &FORMAT=geotiff
  &COVERAGE=local.conc_chl
  &TIME=2017-0116T10:09:21Z
  &BBOX=-180,-90,180,90
  &CRS=EPSG:4326
  &RESPONSE_CRS=EPSG:4326
  &WIDTH=920
  &HEIGHT=487

Checklist:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/source/*
  • Changes documented in CHANGES.md
  • AppVeyor CI passes
  • Test coverage remains or increases (target 100%)

Sorry, something went wrong.

Thomas and others added 30 commits August 1, 2022 14:38
(cherry picked from commit 55c433a)
Refactored and fixed GET /wcs/kvp operation;
Created own WCS config;
Closing temp files in context manager;
Removed tiles API requirement;
Added code comments.
Refactored and fixed GET /wcs/kvp operation;
Created own WCS config;
Closing temp files in context manager;
Removed tiles API requirement;
Added code comments.
Expand var label.
@thomasstorm thomasstorm requested a review from forman January 6, 2023 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants