Skip to content
Permalink
Browse files

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

…not contains
  • Loading branch information
rldhont committed Nov 3, 2017
1 parent 22a7b92 commit d09614cc473c420e363b26c8a603092735236656
Showing with 15 additions and 15 deletions.
  1. +15 −15 src/server/qgswmsserver.cpp
@@ -1832,26 +1832,26 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, const QString& version )
}
else //raster layer
{
QgsRasterLayer* rasterLayer = qobject_cast<QgsRasterLayer*>( currentLayer );
if ( !rasterLayer )
{
continue;
}
if ( !infoPoint.data() )
{
continue;
}
QgsPoint layerInfoPoint = mMapRenderer->mapToLayerCoordinates( currentLayer, *( infoPoint.data() ) );
if ( !rasterLayer->extent().contains( layerInfoPoint ) )
{
continue;
}
if ( infoFormat.startsWith( "application/vnd.ogc.gml" ) )
{
layerElement = result.createElement( "gml:featureMember"/*wfs:FeatureMember*/ );
getFeatureInfoElement.appendChild( layerElement );
}

QgsRasterLayer* rasterLayer = qobject_cast<QgsRasterLayer*>( currentLayer );
if ( rasterLayer )
{
if ( !infoPoint.data() )
{
continue;
}
QgsPoint layerInfoPoint = mMapRenderer->mapToLayerCoordinates( currentLayer, *( infoPoint.data() ) );
if ( featureInfoFromRasterLayer( rasterLayer, &layerInfoPoint, result, layerElement, version, infoFormat ) != 0 )
{
continue;
}
}
else
if ( featureInfoFromRasterLayer( rasterLayer, &layerInfoPoint, result, layerElement, version, infoFormat ) != 0 )
{
continue;
}

0 comments on commit d09614c

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