Skip to content

Commit fed17aa

Browse files
committedSep 20, 2012
wcs test - issues descriptions, GDAL WCS comparison
1 parent 593da45 commit fed17aa

File tree

5 files changed

+293
-109
lines changed

5 files changed

+293
-109
lines changed
 

‎src/providers/wcs/qgswcscapabilities.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ bool QgsWcsCapabilities::parseDescribeCoverageDom10( QByteArray const &xml, QgsW
754754

755755
// may be GTiff, GeoTIFF, TIFF, GIF, ....
756756
coverage->supportedFormat = domElementsTexts( coverageOfferingElement, "supportedFormats.formats" );
757-
//QgsDebugMsg( "supportedFormat = " + coverage->supportedFormat.join( "," ) );
757+
QgsDebugMsg( "supportedFormat = " + coverage->supportedFormat.join( "," ) );
758758

759759
// spatialDomain and Grid/RectifiedGrid are optional according to specificationi.
760760
// If missing, we cannot get native resolution and size.

‎src/providers/wcs/qgswcsprovider.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,11 +804,17 @@ void QgsWcsProvider::cacheReplyFinished()
804804
QgsDebugMsg( "contentType: " + contentType );
805805

806806
// Exception
807+
// Content type examples: text/xml
808+
// application/vnd.ogc.se_xml;charset=UTF-8
809+
// application/xml
807810
if ( contentType.startsWith( "text/", Qt::CaseInsensitive ) ||
808-
contentType.toLower() == "application/vnd.ogc.se_xml" )
811+
contentType.toLower() == "application/xml" ||
812+
contentType.startsWith( "application/vnd.ogc.se_xml", Qt::CaseInsensitive ) )
809813
{
810814
QByteArray text = mCacheReply->readAll();
811-
if (( contentType.toLower() == "text/xml" || contentType.toLower() == "application/vnd.ogc.se_xml" )
815+
if (( contentType.toLower() == "text/xml" ||
816+
contentType.toLower() == "application/xml" ||
817+
contentType.startsWith( "application/vnd.ogc.se_xml", Qt::CaseInsensitive ) )
812818
&& parseServiceExceptionReportDom( text ) )
813819
{
814820
QgsMessageLog::logMessage( tr( "Map request error (Title:%1; Error:%2; URL: %3)" )

‎tests/src/providers/testqgswcspublicservers.cpp

Lines changed: 246 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,25 @@ void TestQgsWcsPublicServers::init()
7777
QCoreApplication::exit( 1 );
7878
}
7979
}
80+
8081
mHead << "Coverage";
81-
mHead << "Version";
82-
mHead << "Snap";
83-
mHead << "Bands";
84-
mHead << "Type";
85-
mHead << "Min";
86-
mHead << "Max";
87-
mHead << "Values";
88-
mHead << "Colors";
8982
mHead << "Has size";
9083

84+
QStringList providers;
85+
providers << "wcs" << "gdal";
86+
foreach ( QString provider, providers )
87+
{
88+
QString prefix = provider == "gdal" ? "GDAL " : "";
89+
mHead << prefix + "CRS";
90+
mHead << prefix + "Snap";
91+
mHead << prefix + "Bands";
92+
mHead << prefix + "Type";
93+
mHead << prefix + "Min";
94+
mHead << prefix + "Max";
95+
mHead << prefix + "Values";
96+
mHead << prefix + "Colors";
97+
}
98+
9199
// read servers + issues list
92100
QString path = QgsApplication::pkgDataPath() + "/resources/wcs-servers.json";
93101
QFile file( path );
@@ -109,6 +117,7 @@ void TestQgsWcsPublicServers::init()
109117
QgsDebugMsg( "serverUrl: " + serverUrl );
110118

111119
Server server( serverUrl );
120+
server.description = serverValue.property( "description" ).toString();
112121

113122
QScriptValue issuesValue = serverValue.property( "issues" );
114123

@@ -122,6 +131,8 @@ void TestQgsWcsPublicServers::init()
122131
QgsDebugMsg( "description: " + description );
123132
Issue issue( description );
124133

134+
issue.offender = issueValue.property( "offender" ).toString();
135+
125136
QScriptValue coveragesValue = issueValue.property( "coverages" );
126137
QScriptValueIterator coveragesIt( coveragesValue );
127138
while ( coveragesIt.hasNext() )
@@ -150,9 +161,18 @@ void TestQgsWcsPublicServers::init()
150161
}
151162
}
152163

153-
QStringList TestQgsWcsPublicServers::issueDescriptions( const QString & url, const QString & coverage, const QString &version )
164+
TestQgsWcsPublicServers::Server TestQgsWcsPublicServers::getServer( const QString & url )
154165
{
155-
QStringList descriptions;
166+
foreach ( Server server, mServers )
167+
{
168+
if ( server.url == url ) return server;
169+
}
170+
return Server();
171+
}
172+
173+
QList<TestQgsWcsPublicServers::Issue> TestQgsWcsPublicServers::issues( const QString & url, const QString & coverage, const QString &version )
174+
{
175+
QList<Issue> issues;
156176
foreach ( Server server, mServers )
157177
{
158178
if ( server.url == url )
@@ -162,14 +182,41 @@ QStringList TestQgsWcsPublicServers::issueDescriptions( const QString & url, con
162182
if (( issue.coverages.size() == 0 || issue.coverages.contains( coverage ) ) &&
163183
( issue.versions.size() == 0 || issue.versions.contains( version ) ) )
164184
{
165-
descriptions << issue.description;
185+
issues << issue;
166186
}
167187
}
168188
}
169189
}
190+
return issues;
191+
}
192+
193+
QStringList TestQgsWcsPublicServers::issueDescriptions( const QString & url, const QString & coverage, const QString &version )
194+
{
195+
QStringList descriptions;
196+
foreach ( Issue myIssue, issues( url, coverage, version ) )
197+
{
198+
descriptions << myIssue.description;
199+
}
170200
return descriptions;
171201
}
172202

203+
int TestQgsWcsPublicServers::issueOffender( const QString & url, const QString & coverage, const QString &version )
204+
{
205+
int offender = NoOffender;
206+
foreach ( Issue myIssue, issues( url, coverage, version ) )
207+
{
208+
if ( myIssue.offender == "server" )
209+
{
210+
offender |= ServerOffender;
211+
}
212+
else
213+
{
214+
offender |= QGisOffender;
215+
}
216+
}
217+
return offender;
218+
}
219+
173220
void TestQgsWcsPublicServers::test( )
174221
{
175222
QStringList versions;
@@ -183,7 +230,9 @@ void TestQgsWcsPublicServers::test( )
183230
}
184231
else
185232
{
186-
versions << "" << "1.0.0" << "1.1.0"; // empty for default
233+
//versions << "" << "1.0.0" << "1.1.0"; // empty for default
234+
// Empty is version is the same like "1.0.0" because QGIS will try "1.0.0" first
235+
versions << "1.0.0" << "1.1.0";
187236
}
188237

189238

@@ -263,6 +312,7 @@ void TestQgsWcsPublicServers::test( )
263312
continue;
264313
}
265314

315+
myVersionLog << QString( "totalCoverages:%1" ).arg( myCoverages.size() );
266316

267317
int myCoverageCount = 0;
268318
int myStep = myCoverages.size() / qMin( mMaxCoverages, myCoverages.size() );
@@ -291,8 +341,6 @@ void TestQgsWcsPublicServers::test( )
291341

292342
QString myPath = myVersionDirPath + QDir::separator() + myCoverage.identifier;
293343
QString myLogPath = myPath + ".log";
294-
QString myPngPath = myPath + ".png";
295-
QgsDebugMsg( "myPngPath = " + myPngPath );
296344

297345
if ( QFileInfo( myLogPath ).exists() && !mForce )
298346
{
@@ -325,80 +373,111 @@ void TestQgsWcsPublicServers::test( )
325373
}
326374
myLog << QString( "hasSize:%1" ).arg( myCoverage.hasSize );
327375

328-
QgsRasterLayer * myLayer = new QgsRasterLayer( myUri.encodedUri(), myCoverage.identifier, "wcs", true );
329-
if ( myLayer->isValid() )
376+
// Test QGIS provider and via GDAL
377+
QStringList providers;
378+
providers << "wcs" << "gdal";
379+
380+
foreach ( QString provider, providers )
330381
{
331-
int myBandCount = myLayer->dataProvider()->bandCount();
332-
myLog << "bandCount:" + QString::number( myBandCount );
333-
if ( myBandCount > 0 )
382+
QString uri;
383+
if ( provider == "wcs" )
334384
{
335-
myLog << "srcType:" + QString::number( myLayer->dataProvider()->srcDataType( 1 ) );
336-
337-
QgsRasterBandStats myStats = myLayer->dataProvider()->bandStatistics( 1, QgsRasterBandStats::All, QgsRectangle(), myWidth * myHeight );
338-
myLog << "min:" + QString::number( myStats.minimumValue );
339-
myLog << "max:" + QString::number( myStats.maximumValue );
385+
uri = myUri.encodedUri();
386+
}
387+
else // gdal
388+
{
389+
uri = myPath + "-gdal.xml";
390+
QFile myGdalXmlFile( uri );
391+
myGdalXmlFile.open( QIODevice::WriteOnly | QIODevice::Text );
392+
QTextStream myStream( &myGdalXmlFile );
393+
myStream << "<WCS_GDAL>\n";
394+
myStream << " <ServiceURL>" + serverUrl + "?" + "</ServiceURL>\n";
395+
myStream << " <CoverageName>" + myCoverage.identifier + "</CoverageName>\n";
396+
myStream << " <Version>" + version + "</Version>\n";
397+
myStream << " <Timeout>60</Version>\n";
398+
myStream << "</WCS_GDAL>\n";
399+
400+
myGdalXmlFile.close();
340401
}
341402

342-
QgsMapRenderer myMapRenderer;
343-
QList<QgsMapLayer *> myLayersList;
403+
QgsRasterLayer * myLayer = new QgsRasterLayer( uri, myCoverage.identifier, provider, true );
404+
if ( myLayer->isValid() )
405+
{
406+
myLog << provider + "_crs:" + myLayer->dataProvider()->crs().authid();
407+
int myBandCount = myLayer->dataProvider()->bandCount();
408+
myLog << provider + "_bandCount:" + QString::number( myBandCount );
409+
if ( myBandCount > 0 )
410+
{
411+
myLog << provider + "_srcType:" + QString::number( myLayer->dataProvider()->srcDataType( 1 ) );
344412

345-
myLayersList.append( myLayer );
346-
QgsMapLayerRegistry::instance()->addMapLayers( myLayersList, false );
413+
QgsRasterBandStats myStats = myLayer->dataProvider()->bandStatistics( 1, QgsRasterBandStats::All, QgsRectangle(), myWidth * myHeight );
414+
myLog << provider + "_min:" + QString::number( myStats.minimumValue );
415+
myLog << provider + "_max:" + QString::number( myStats.maximumValue );
416+
}
347417

348-
QMap<QString, QgsMapLayer*> myLayersMap = QgsMapLayerRegistry::instance()->mapLayers();
418+
QgsMapRenderer myMapRenderer;
419+
QList<QgsMapLayer *> myLayersList;
349420

350-
myMapRenderer.setLayerSet( myLayersMap.keys() );
421+
myLayersList.append( myLayer );
422+
QgsMapLayerRegistry::instance()->addMapLayers( myLayersList, false );
351423

352-
myMapRenderer.setExtent( myLayer->extent() );
424+
QMap<QString, QgsMapLayer*> myLayersMap = QgsMapLayerRegistry::instance()->mapLayers();
353425

354-
QImage myImage( myWidth, myHeight, QImage::Format_ARGB32_Premultiplied );
355-
myImage.fill( 0 );
426+
myMapRenderer.setLayerSet( myLayersMap.keys() );
356427

357-
myMapRenderer.setOutputSize( QSize( myWidth, myHeight ), myImage.logicalDpiX() );
428+
myMapRenderer.setExtent( myLayer->extent() );
358429

359-
QPainter myPainter( &myImage );
360-
myMapRenderer.render( &myPainter );
430+
QImage myImage( myWidth, myHeight, QImage::Format_ARGB32_Premultiplied );
431+
myImage.fill( 0 );
361432

362-
// Save rendered image
363-
myImage.save( myPngPath );
433+
myMapRenderer.setOutputSize( QSize( myWidth, myHeight ), myImage.logicalDpiX() );
364434

365-
// Verify data
366-
QSet<QString> myValues; // cannot be QSet<double>
367-
void *myData = myLayer->dataProvider()->readBlock( 1, myLayer->extent(), myWidth, myHeight );
368-
if ( myData )
369-
{
370-
int myType = myLayer->dataProvider()->dataType( 1 );
435+
QPainter myPainter( &myImage );
436+
myMapRenderer.render( &myPainter );
437+
438+
// Save rendered image
439+
QString myPngPath = myPath + "-" + provider + ".png";
440+
QgsDebugMsg( "myPngPath = " + myPngPath );
441+
myImage.save( myPngPath );
442+
443+
// Verify data
444+
QSet<QString> myValues; // cannot be QSet<double>
445+
void *myData = myLayer->dataProvider()->readBlock( 1, myLayer->extent(), myWidth, myHeight );
446+
if ( myData )
447+
{
448+
int myType = myLayer->dataProvider()->dataType( 1 );
449+
for ( int row = 0; row < myHeight; row++ )
450+
{
451+
for ( int col = 0; col < myWidth; col++ )
452+
{
453+
double value = myLayer->dataProvider()->readValue( myData, myType, row * myWidth + col );
454+
QString valueStr = QString::number( value );
455+
if ( !myValues.contains( valueStr ) ) myValues.insert( valueStr );
456+
}
457+
}
458+
free( myData );
459+
}
460+
QgsDebugMsg( QString( "%1 values" ).arg( myValues.size() ) );
461+
myLog << provider + QString( "_valuesCount:%1" ).arg( myValues.size() );
462+
463+
// Verify image colors
464+
QSet<QRgb> myColors;
371465
for ( int row = 0; row < myHeight; row++ )
372466
{
373467
for ( int col = 0; col < myWidth; col++ )
374468
{
375-
double value = myLayer->dataProvider()->readValue( myData, myType, row * myWidth + col );
376-
QString valueStr = QString::number( value );
377-
if ( !myValues.contains( valueStr ) ) myValues.insert( valueStr );
469+
QRgb color = myImage.pixel( col, row );
470+
if ( !myColors.contains( color ) ) myColors.insert( color );
378471
}
379472
}
380-
free( myData );
473+
QgsDebugMsg( QString( "%1 colors" ).arg( myColors.size() ) );
474+
myLog << provider + QString( "_colorsCount:%1" ).arg( myColors.size() );
381475
}
382-
QgsDebugMsg( QString( "%1 values" ).arg( myValues.size() ) );
383-
myLog << QString( "valuesCount:%1" ).arg( myValues.size() );
384-
385-
// Verify image colors
386-
QSet<QRgb> myColors;
387-
for ( int row = 0; row < myHeight; row++ )
476+
else
388477
{
389-
for ( int col = 0; col < myWidth; col++ )
390-
{
391-
QRgb color = myImage.pixel( col, row );
392-
if ( !myColors.contains( color ) ) myColors.insert( color );
393-
}
478+
QgsDebugMsg( "Layer is not valid" );
479+
myLog << provider + "_error:Layer is not valid";
394480
}
395-
QgsDebugMsg( QString( "%1 colors" ).arg( myColors.size() ) );
396-
myLog << QString( "colorsCount:%1" ).arg( myColors.size() );
397-
}
398-
else
399-
{
400-
QgsDebugMsg( "Layer is not valid" );
401-
myLog << "error:Layer is not valid";
402481
}
403482

404483
QFile myLogFile( myLogPath );
@@ -461,6 +540,11 @@ void TestQgsWcsPublicServers::report()
461540
QMap<QString, QString> myServerLog = readLog( myServerLogPath );
462541

463542
myReport += QString( "<h2>Server: %1</h2>" ).arg( myServerLog.value( "server" ) );
543+
Server myServer = getServer( myServerLog.value( "server" ) );
544+
if ( !myServer.description.isEmpty() )
545+
{
546+
myReport += myServer.description + "<br>";
547+
}
464548

465549
QString myServerReport;
466550

@@ -506,52 +590,92 @@ void TestQgsWcsPublicServers::report()
506590

507591
QString myLogPath = myVersionDir.absolutePath() + QDir::separator() + myLogFileName;
508592
QMap<QString, QString>myLog = readLog( myLogPath );
593+
myVersionReport += "<tr>";
594+
509595
QStringList myValues;
510596
myValues << QString( "<a href='%1'>%2</a>" ).arg( myLog.value( "describeCoverageUrl" ) ).arg( myLog.value( "identifier" ) );
511-
myValues << myLog.value( "version" );
512-
QString imgPath = myVersionDir.absolutePath() + QDir::separator() + QFileInfo( myLogPath ).completeBaseName() + ".png";
597+
myValues << myLog.value( "hasSize" );
598+
myVersionReport += cells( myValues );
599+
myValues.clear();
513600

514-
if ( !myLog.value( "error" ).isEmpty() )
515-
{
516-
myValues << myLog.value( "error" );
517-
QStringList issues = issueDescriptions( myServerLog.value( "server" ), myLog.value( "identifier" ), myLog.value( "version" ) );
518-
myValues << issues.join( "<br>" );
519-
myVersionReport += row( myValues, "cellerr" );
520-
myVersionErrCount++;
521-
}
522-
else
601+
QStringList providers;
602+
providers << "wcs" << "gdal";
603+
604+
foreach ( QString provider, providers )
523605
{
524-
myValues << "<img src='" + imgPath + "'>";
525-
myValues << myLog.value( "bandCount" );
526-
myValues << myLog.value( "srcType" );
527-
myValues << myLog.value( "min" );
528-
myValues << myLog.value( "max" );
529-
myValues << myLog.value( "valuesCount" );
530-
myValues << myLog.value( "colorsCount" );
531-
myValues << myLog.value( "hasSize" );
532-
533-
QString cls;
534-
int myValuesCount = myLog.value( "valuesCount" ).toInt();
535-
int myColorsCount = myLog.value( "colorsCount" ).toInt();
536-
if ( myValuesCount < 4 )
606+
607+
QString imgPath = myVersionDir.absolutePath() + QDir::separator() + QFileInfo( myLogPath ).completeBaseName() + "-" + provider + ".png";
608+
609+
if ( !myLog.value( provider + "_error" ).isEmpty() )
537610
{
538-
cls = "cellerr";
539-
myVersionErrCount++;
540-
myCoverageErrCount++;
611+
myValues << myLog.value( provider + "_error" );
612+
int offender = NoOffender;
613+
if ( provider == "wcs" )
614+
{
615+
QStringList issues = issueDescriptions( myServerLog.value( "server" ), myLog.value( "identifier" ), myLog.value( "version" ) );
616+
myValues << issues.join( "<br>" );
617+
618+
offender = issueOffender( myServerLog.value( "server" ), myLog.value( "identifier" ), myLog.value( "version" ) );
619+
myVersionErrCount++;
620+
}
621+
QString cls;
622+
if ( offender == ServerOffender )
623+
{
624+
cls = "cell-err-server";
625+
}
626+
else if ( offender == QGisOffender )
627+
{
628+
cls = "cell-err-qgis";
629+
}
630+
else
631+
{
632+
cls = "cell-err";
633+
}
634+
myVersionReport += cells( myValues, cls, 8 );
635+
myValues.clear();
541636
}
542-
else if ( myColorsCount < 4 )
637+
else
543638
{
544-
cls = "cellwarn";
545-
myVersionWarnCount++;
546-
myCoverageWarnCount++;
639+
myValues << myLog.value( provider + "_crs" );
640+
myValues << "<img src='" + imgPath + "'>";
641+
myValues << myLog.value( provider + "_bandCount" );
642+
myValues << myLog.value( provider + "_srcType" );
643+
myValues << myLog.value( provider + "_min" );
644+
myValues << myLog.value( provider + "_max" );
645+
myValues << myLog.value( provider + "_valuesCount" );
646+
myValues << myLog.value( provider + "_colorsCount" );
647+
648+
QString cls;
649+
int myValuesCount = myLog.value( provider + "_valuesCount" ).toInt();
650+
int myColorsCount = myLog.value( provider + "_colorsCount" ).toInt();
651+
if ( myValuesCount < 4 )
652+
{
653+
cls = "cell-err";
654+
if ( provider == "wcs" )
655+
{
656+
myVersionErrCount++;
657+
myCoverageErrCount++;
658+
}
659+
}
660+
else if ( myColorsCount < 4 )
661+
{
662+
cls = "cell-warn";
663+
if ( provider == "wcs" )
664+
{
665+
myVersionWarnCount++;
666+
myCoverageWarnCount++;
667+
}
668+
}
669+
myVersionReport += cells( myValues, cls );
670+
myValues.clear();
547671
}
548-
549-
myVersionReport += row( myValues, cls );
550672
}
673+
myVersionReport += "<tr>\n";
551674
} // coverages
552675
myVersionReport += "</table>\n";
553676
// prepend counts
554-
myVersionReport.prepend( QString( "<b>Coverages: %1</b><br>\n" ).arg( myVersionCoverageCount ) +
677+
myVersionReport.prepend( QString( "<b>Total coverages: %1</b><br>\n" ).arg( myVersionLog.value( "totalCoverages" ) ) +
678+
QString( "<b>Tested coverages: %1</b><br>\n" ).arg( myVersionCoverageCount ) +
555679
QString( "<b>Errors: %1</b><br>\n" ).arg( myVersionErrCount ) +
556680
QString( "<b>Warnings: %1</b><br><br>" ).arg( myVersionWarnCount ) );
557681
myServerReport += myVersionReport;
@@ -572,10 +696,12 @@ void TestQgsWcsPublicServers::report()
572696
myRep += "<style>";
573697
myRep += ".tab { border-spacing: 0px; border-width: 1px 1px 0 0; border-style: solid; }";
574698
myRep += ".cell { border-width: 0 0 1px 1px; border-style: solid; font-size: smaller; text-align: center}";
575-
//myReport += ".cellok { background: #00ff00; }";
576-
myRep += ".cellok { background: #ffffff; }";
577-
myRep += ".cellwarn { background: #ffcc00; }";
578-
myRep += ".cellerr { background: #ff0000; }";
699+
//myReport += ".cell-ok { background: #00ff00; }";
700+
myRep += ".cell-ok { background: #ffffff; }";
701+
myRep += ".cell-warn { background: #ffcc00; }";
702+
myRep += ".cell-err { background: #ff0000; }";
703+
myRep += ".cell-err-server { background: #ffff00; }";
704+
myRep += ".cell-err-qgis { background: #ff0000; }";
579705
myRep += ".errmsg { color: #ff0000; }";
580706
myRep += "</style>";
581707

@@ -618,6 +744,22 @@ QString TestQgsWcsPublicServers::error( QString theMessage )
618744
return myRow;
619745
}
620746

747+
QString TestQgsWcsPublicServers::cells( QStringList theValues, QString theClass, int colspan )
748+
{
749+
QString myRow;
750+
for ( int i = 0; i < theValues.size(); i++ )
751+
{
752+
QString val = theValues.value( i );
753+
QString colspanStr;
754+
if ( colspan > 1 && i == theValues.size() - 1 )
755+
{
756+
colspanStr = QString( "colspan=%1" ).arg( colspan - theValues.size() + 1 ) ;
757+
}
758+
myRow += QString( "<td class='cell %1' %2>%3</td>" ).arg( theClass ).arg( colspanStr ).arg( val );
759+
}
760+
return myRow;
761+
}
762+
621763
QString TestQgsWcsPublicServers::row( QStringList theValues, QString theClass )
622764
{
623765
QString myRow = "<tr>";

‎tests/src/providers/testqgswcspublicservers.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class TestQgsWcsPublicServers: public QObject
3535
// Known problem
3636
struct Issue
3737
{
38+
QString offender; // server or empty == qgis
3839
QStringList versions; // version regex
3940
QStringList coverages; // coverage regex
4041
QString description; // problem description
@@ -45,24 +46,37 @@ class TestQgsWcsPublicServers: public QObject
4546
Server( ) {}
4647
Server( const QString & u ) : url( u ) {}
4748
QString url; // URL
49+
QString description; // notes
4850
QList<TestQgsWcsPublicServers::Issue> issues;
4951
};
5052

53+
enum OffenderType
54+
{
55+
NoOffender = 0,
56+
ServerOffender = 1,
57+
QGisOffender = 1 << 1
58+
};
5159

5260
TestQgsWcsPublicServers( const QString & cacheDirPath, int maxCoverages, const QString & server = QString(), const QString & coverage = QString(), const QString &version = QString(), bool force = false );
5361

5462
void init();
5563
void test();
5664
void report();
5765
private:
66+
QString cells( QStringList theValues, QString theClass = QString(), int colspan = 1 );
5867
QString row( QStringList theValues, QString theClass = QString() );
5968
QString error( QString theMessage );
6069
void writeReport( QString theReport );
6170

6271
QMap<QString, QString> readLog( QString theFileName );
6372

73+
Server getServer( const QString & url );
74+
75+
QList<Issue> issues( const QString & url, const QString & coverage, const QString &version );
6476
QStringList issueDescriptions( const QString & url, const QString & coverage, const QString &version );
6577

78+
int issueOffender( const QString & url, const QString & coverage, const QString &version );
79+
6680
QString mCacheDirPath;
6781
QDir mCacheDir;
6882

‎tests/src/providers/wcs-servers.json

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
11
[
22
{
33
url: 'http://demo.opengeo.org/geoserver/wcs',
4+
description: 'Does not work at all with gvSIG-1_11-1305-final.',
45
issues: [
56
{
7+
offender: 'server',
68
coverages: [ 'og:0' ],
7-
versions: [ ],
8-
description: 'Server fails on DescribeCoverage with: java.io.IOException null Translator error Unexpected error occurred during describe coverage xml encoding ...'
9+
versions: [ '1.0.0' ],
10+
description: 'The server fails in DescribeCoverage with: java.io.IOException null Translator error Unexpected error occurred during describe coverage xml encoding ...'
11+
},{
12+
offender: 'server',
13+
coverages: [ 'bm' ],
14+
versions: [ '1.1.0' ],
15+
description: 'The server fails in DescribeCoverage with: java.io.IOException null Translator error Unexpected error occurred during describe coverage xml encoding ...'
16+
},{
17+
offender: 'server',
18+
coverages: [ 'usgs:nlcd', 'nlcd' ],
19+
versions: [ '1.0.0', '1.1.0' ],
20+
description: 'The server does no offer any CRS in DescribeCoverage supportedCRSs / supportedCRS. QGIS tries to get coverage using EPSG:5070, in which the coverage spatialDomain.Envelope is defined, but server fails reporting error: Could not recognize crs ...'
21+
},{
22+
offender: 'server',
23+
coverages: [ '0', 'naturalearth' ],
24+
versions: [ '1.1.0' ],
25+
description: "The server fails in GetCoverage with 'java.lang.IllegalArgumentException: xScale:the parameter value is not valid. xScale:the parameter value is not valid.' It fails with BOUNDINGBOX=-2,-6,2,6&GRIDORIGIN=2,-6&GRIDOFFSETS=-2,3 but works with BOUNDINGBOX=-2,-6,2,6&GRIDORIGIN=2,-6&GRIDOFFSETS=2,-3 (GRIDOFFSETS signs switched) other coverages (Arc_Sample e.g.) work OK with the first"
26+
},{
27+
offender: 'server',
28+
coverages: [ 'Img_Sample' ],
29+
versions: [ '1.1.0' ],
30+
description: "The server fails in GetCoverage with 'java.lang.IllegalArgumentException: The specified dimensional parameter is non-positive. The specified dimensional parameter is non-positive'."
931
}
1032
]
1133
}, {

0 commit comments

Comments
 (0)
Please sign in to comment.