Skip to content
Permalink
Browse files

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

  • Loading branch information
alexbruy committed Jan 29, 2019
1 parent 82ec141 commit 2f7550d1a22ad9813786e78c5a23767f253065e7
Showing with 8 additions and 2 deletions.
  1. +8 −1 src/providers/wcs/qgswcscapabilities.cpp
  2. +0 −1 src/providers/wcs/qgswcssourceselect.cpp
@@ -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" ) );

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

QStringList QgsWCSSourceSelect::selectedLayersCrses()
{

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

0 comments on commit 2f7550d

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