Skip to content
Permalink
Browse files

[BUGFIX][Server] GetFeaturInfo: do not identify raster data if point …

…not contains

Manual forwardporting with enhancement for raster data values displayed
  • Loading branch information
rldhont committed Nov 16, 2017
1 parent 29c8f7c commit 861987daa3391b2ef09c982897ec9ea30ad456fc
Showing with 15 additions and 11 deletions.
  1. +15 −11 src/server/services/wms/qgswmsrenderer.cpp
@@ -1319,23 +1319,27 @@ namespace QgsWms
}
else
{
QgsRasterLayer *rasterLayer = qobject_cast<QgsRasterLayer *>( layer );
if ( !rasterLayer )
{
break;
}
if ( !infoPoint )
{
break;
}
QgsPointXY layerInfoPoint = mapSettings.mapToLayerCoordinates( layer, *( infoPoint.get() ) );
if ( !rasterLayer->extent().contains( layerInfoPoint ) )
{
break;
}
if ( infoFormat == QgsWmsParameters::Format::GML )
{
layerElement = result.createElement( QStringLiteral( "gml:featureMember" )/*wfs:FeatureMember*/ );
getFeatureInfoElement.appendChild( layerElement );
}

QgsRasterLayer *rasterLayer = qobject_cast<QgsRasterLayer *>( layer );
if ( rasterLayer )
{
if ( !infoPoint )
{
break;
}
QgsPointXY layerInfoPoint = mapSettings.mapToLayerCoordinates( layer, *( infoPoint.get() ) );
( void )featureInfoFromRasterLayer( rasterLayer, mapSettings, &layerInfoPoint, result, layerElement, version );
break;
}
( void )featureInfoFromRasterLayer( rasterLayer, mapSettings, &layerInfoPoint, result, layerElement, version );
}
break;
}

0 comments on commit 861987d

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