Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[bugfix][wms] Fix GetFeatureInfo
Fixes #17498 WMS GetFeatureInfo requests not working

Use the right variable instead of an
unitialized one ( followup b119744 )
  • Loading branch information
elpaso committed Nov 22, 2017
1 parent 087087f commit 94a1e68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -2454,6 +2454,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPointXY &point, QgsRa
double xRes = myExtent.width() / width;
double yRes = myExtent.height() / height;


// Mapserver (6.0.3, for example) does not seem to work with 1x1 pixel box
// (seems to be a different issue, not the slownes of GDAL with ECW mentioned above)
// so we have to enlarge it a bit
Expand All @@ -2474,8 +2475,8 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPointXY &point, QgsRa
QgsDebugMsg( QString( "xRes = %1 yRes = %2" ).arg( xRes ).arg( yRes ) );

QgsPointXY finalPoint;
finalPoint.setX( std::floor( ( finalPoint.x() - myExtent.xMinimum() ) / xRes ) );
finalPoint.setY( std::floor( ( myExtent.yMaximum() - finalPoint.y() ) / yRes ) );
finalPoint.setX( std::floor( ( point.x() - myExtent.xMinimum() ) / xRes ) );
finalPoint.setY( std::floor( ( myExtent.yMaximum() - point.y() ) / yRes ) );

QgsDebugMsg( QString( "point = %1 %2" ).arg( finalPoint.x() ).arg( finalPoint.y() ) );

Expand Down

0 comments on commit 94a1e68

Please sign in to comment.