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 3, 2017
1 parent 66bcfbb commit 61e421d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/server/qgswmsserver.cpp
Expand Up @@ -1825,26 +1825,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 61e421d

Please sign in to comment.