Skip to content

Commit 146a398

Browse files
committed
[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.
1 parent 2895819 commit 146a398

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/server/qgswmsserver.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -2582,12 +2582,7 @@ int QgsWMSServer::featureInfoFromRasterLayer( QgsRasterLayer* layer,
25822582
int index = 0;
25832583
Q_FOREACH ( int bandNo, values.keys() )
25842584
{
2585-
if ( values.value( bandNo ).isNull() )
2586-
{
2587-
fields.append( QgsField( layer->bandName( bandNo ), QVariant::String ) );
2588-
feature.setAttribute( index++, "no data" );
2589-
}
2590-
else
2585+
if ( !values.value( bandNo ).isNull() )
25912586
{
25922587
QVariant value( values.value( bandNo ) );
25932588
fields.append( QgsField( layer->bandName( bandNo ), QVariant::Double ) );

0 commit comments

Comments
 (0)