Skip to content

Commit

Permalink
Merge pull request #7224 from rldhont/server-wms-getfeatureinfo-raste…
Browse files Browse the repository at this point in the history
…r-gml-no-data

[Server] WMS GetFeatureInfo Raster GML: do not add attribute for no data
  • Loading branch information
rldhont committed Jun 14, 2018
2 parents 247836b + 146a398 commit 514d036
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/server/qgswmsserver.cpp
Expand Up @@ -2582,12 +2582,7 @@ int QgsWMSServer::featureInfoFromRasterLayer( QgsRasterLayer* layer,
int index = 0;
Q_FOREACH ( int bandNo, values.keys() )
{
if ( values.value( bandNo ).isNull() )
{
fields.append( QgsField( layer->bandName( bandNo ), QVariant::String ) );
feature.setAttribute( index++, "no data" );
}
else
if ( !values.value( bandNo ).isNull() )
{
QVariant value( values.value( bandNo ) );
fields.append( QgsField( layer->bandName( bandNo ), QVariant::Double ) );
Expand Down

0 comments on commit 514d036

Please sign in to comment.