Skip to content

Commit

Permalink
[wcs] improve CRS handling when parsing DescribeCoverage responce (refs
Browse files Browse the repository at this point in the history
#21045)

(cherry picked from commit 2f7550d)
  • Loading branch information
alexbruy committed Feb 5, 2019
1 parent fef5176 commit 8b5d50c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/providers/wcs/qgswcscapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) );

Expand Down
1 change: 0 additions & 1 deletion src/providers/wcs/qgswcssourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ QStringList QgsWCSSourceSelect::selectedLayersFormats()

QStringList QgsWCSSourceSelect::selectedLayersCrses()
{

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

Expand Down

0 comments on commit 8b5d50c

Please sign in to comment.