Skip to content
Permalink
Browse files

Merge pull request #5664 from rldhont/server-getfeatureinfo-raster-di…

…splay

[BUGFIX][Server] GetFeaturInfo: do not identify raster data if point …
  • Loading branch information
rldhont committed Nov 17, 2017
2 parents 48c320b + 861987d commit 1989111fb166db468e144f43113d547ec955ba45
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 1989111

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