Skip to content
Permalink
Browse files

[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 94a1e68a25199e455bc6126ed02c55ff250defa9
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/providers/wms/qgswmsprovider.cpp
@@ -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
@@ -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() ) );

0 comments on commit 94a1e68

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