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
  • Loading branch information
alexbruy committed Jan 29, 2019
1 parent 82ec141 commit 2f7550d
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 @@ -794,9 +794,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 2f7550d

Please sign in to comment.