Skip to content

Commit e192e39

Browse files
committedOct 19, 2012
identify context only if not projected on server
1 parent 14de543 commit e192e39

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
 

‎src/mapserver/qgswmsserver.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,16 @@ int QgsWMSServer::featureInfoFromRasterLayer( QgsRasterLayer* layer,
13041304

13051305
QMap<QString, QString> attributes;
13061306
// use context extent, width height (comes with request) to use WCS cache
1307-
attributes = layer->dataProvider()->identify( *infoPoint, mMapRenderer->extent(), mMapRenderer->outputSize().width(), mMapRenderer->outputSize().height() );
1307+
// We can only use context if raster is not reprojected, otherwise it is difficult
1308+
// to guess correct source resolution
1309+
if ( mMapRenderer->hasCrsTransformEnabled() && layer->dataProvider()->crs() != mMapRenderer->destinationCrs() )
1310+
{
1311+
attributes = layer->dataProvider()->identify( *infoPoint );
1312+
}
1313+
else
1314+
{
1315+
attributes = layer->dataProvider()->identify( *infoPoint, mMapRenderer->extent(), mMapRenderer->outputSize().width(), mMapRenderer->outputSize().height() );
1316+
}
13081317

13091318
for ( QMap<QString, QString>::const_iterator it = attributes.constBegin(); it != attributes.constEnd(); ++it )
13101319
{

0 commit comments

Comments
 (0)
Please sign in to comment.