Skip to content
Permalink
Browse files

[wcs] improve CRS handling when parsing DescribeCoverage responce (refs

#21045)

(cherry picked from commit 2f7550d)
  • Loading branch information
alexbruy committed Jan 28, 2019
1 parent fef5176 commit 8b5d50cec9dc59181ee4c73ce6d9e2868d5fb83d
Showing with 8 additions and 2 deletions.
  1. +8 −1 src/providers/wcs/qgswcscapabilities.cpp
  2. +0 −1 src/providers/wcs/qgswcssourceselect.cpp
@@ -790,9 +790,16 @@ bool QgsWcsCapabilities::parseDescribeCoverageDom10( QByteArray const &xml, QgsW
QDomElement supportedCRSsElement = firstChild( coverageOfferingElement, QStringLiteral( "supportedCRSs" ) );

// requestResponseCRSs and requestCRSs + responseCRSs are alternatives
// we try to parse one or the other
coverage->supportedCrs = domElementsTexts( coverageOfferingElement, QStringLiteral( "supportedCRSs.requestResponseCRSs" ) );
if ( coverage->supportedCrs.isEmpty() )
{
coverage->supportedCrs = domElementsTexts( coverageOfferingElement, QStringLiteral( "supportedCRSs.requestCRSs" ) );
coverage->supportedCrs << domElementsTexts( coverageOfferingElement, QStringLiteral( "supportedCRSs.responseCRSs" ) );
}

// TODO: requestCRSs, responseCRSs - must be then implemented also in provider
//QgsDebugMsg( "supportedCrs = " + coverage->supportedCrs.join( "," ) );
QgsDebugMsg( "supportedCrs = " + coverage->supportedCrs.join( "," ) );

coverage->nativeCrs = domElementText( coverageOfferingElement, QStringLiteral( "supportedCRSs.nativeCRSs" ) );

@@ -226,7 +226,6 @@ QStringList QgsWCSSourceSelect::selectedLayersFormats()

QStringList QgsWCSSourceSelect::selectedLayersCrses()
{

QString identifier = selectedIdentifier();
if ( identifier.isEmpty() ) { return QStringList(); }

0 comments on commit 8b5d50c

Please sign in to comment.
You can’t perform that action at this time.