Skip to content
Permalink
Browse files

[Server] WMS GetFeatureInfo Raster GML: do not add attribute for no data

For WMS GetFeatureInfo request on a raster layer with GML as output, if the
identify value is null, do not ad the band as an attribute.
  • Loading branch information
rldhont committed Jun 12, 2018
1 parent 2895819 commit 146a3986138a3cdacddbc1f68e51e830d15fe983
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/server/qgswmsserver.cpp
@@ -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 ) );

0 comments on commit 146a398

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