Skip to content

Commit

Permalink
[BUGFIX][Server] GetFeaturInfo: do not identify raster data if point …
Browse files Browse the repository at this point in the history
…not contains
  • Loading branch information
rldhont committed Nov 6, 2017
1 parent 22a7b92 commit d09614c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/server/qgswmsserver.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit d09614c

Please sign in to comment.