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

fix CRS handling in the DescribeCoverage response (refs #21045) [wcs] #9005

Merged
merged 3 commits into from
Feb 4, 2019
Merged

fix CRS handling in the DescribeCoverage response (refs #21045) [wcs] #9005

merged 3 commits into from
Feb 4, 2019

Conversation

alexbruy
Copy link
Contributor

@alexbruy alexbruy commented Jan 28, 2019

Description

According to the OGC WCS 1.0.0 specification in the DescribeCoverage response the supportedCRSs element has either a requestResponseCRSs sub-element, or both a requestCRSs sub-element and a responseCRSs sub-element. QGIS WCS provider handles only case when requestResponseCRSs sub-element is present. As result a wrong GetCoverage request constructed later as described in https://issues.qgis.org/issues/21045.

Another related issue is that some WCS servers, for example http://thredds.ucar.edu/thredds/wcs/grib/NCEP/WW3/Regional_US_West_Coast/Best, contain invalid(?) CRS definition EPSG:0 [Latitude_Longitude] in the response elements, e.g

<gml:RectifiedGrid srsName="EPSG:0 [Latitude_Longitude]" dimension="2">

which is used later to construct WCS request.

This PR tries to fix both issues:

  1. parsing of the DescribeCoverage now handles either a requestResponseCRSs sub-element, or both a requestCRSs sub-element and a responseCRSs sub-element.
  2. CRS definitions from the DescribeCoverage response now checked for validity and invalid definitions are excluded from the coverage summary.

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • Commits which add new features are tagged with [FEATURE] in the commit message
  • Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and contain sufficient information in the commit message to be documented
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit

@alexbruy alexbruy added Bugfix and removed Bugfix labels Jan 28, 2019
@m-kuhn m-kuhn changed the title [wcs] fix CRS handling in the DescribeCoverage response (refs #21045) fix CRS handling in the DescribeCoverage response (refs #21045) [wcs] Jan 30, 2019
@alexbruy alexbruy merged commit e953141 into qgis:master Feb 4, 2019
@alexbruy alexbruy deleted the wcs-fix branch February 4, 2019 07:03
@alexbruy alexbruy mentioned this pull request Feb 5, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants