Skip to content

Commit 8b5d50c

Browse files
committedFeb 5, 2019
[wcs] improve CRS handling when parsing DescribeCoverage responce (refs #21045)
(cherry picked from commit 2f7550d)
1 parent fef5176 commit 8b5d50c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
 

‎src/providers/wcs/qgswcscapabilities.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,9 +790,16 @@ bool QgsWcsCapabilities::parseDescribeCoverageDom10( QByteArray const &xml, QgsW
790790
QDomElement supportedCRSsElement = firstChild( coverageOfferingElement, QStringLiteral( "supportedCRSs" ) );
791791

792792
// requestResponseCRSs and requestCRSs + responseCRSs are alternatives
793+
// we try to parse one or the other
793794
coverage->supportedCrs = domElementsTexts( coverageOfferingElement, QStringLiteral( "supportedCRSs.requestResponseCRSs" ) );
795+
if ( coverage->supportedCrs.isEmpty() )
796+
{
797+
coverage->supportedCrs = domElementsTexts( coverageOfferingElement, QStringLiteral( "supportedCRSs.requestCRSs" ) );
798+
coverage->supportedCrs << domElementsTexts( coverageOfferingElement, QStringLiteral( "supportedCRSs.responseCRSs" ) );
799+
}
800+
794801
// TODO: requestCRSs, responseCRSs - must be then implemented also in provider
795-
//QgsDebugMsg( "supportedCrs = " + coverage->supportedCrs.join( "," ) );
802+
QgsDebugMsg( "supportedCrs = " + coverage->supportedCrs.join( "," ) );
796803

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

‎src/providers/wcs/qgswcssourceselect.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ QStringList QgsWCSSourceSelect::selectedLayersFormats()
226226

227227
QStringList QgsWCSSourceSelect::selectedLayersCrses()
228228
{
229-
230229
QString identifier = selectedIdentifier();
231230
if ( identifier.isEmpty() ) { return QStringList(); }
232231

0 commit comments

Comments
 (0)
Please sign in to comment.