Skip to content
Permalink
Browse files

Indentation

  • Loading branch information
mhugent committed Jun 24, 2017
1 parent ef8e58b commit e7ea972c649a9ed62510d0c2cc80499d7411f29d
@@ -717,9 +717,9 @@ namespace QgsWms

//read FILTER_GEOM
std::unique_ptr<QgsGeometry> filterGeom;
if( mParameters.contains( QStringLiteral( "FILTER_GEOM" ) ) )
if ( mParameters.contains( QStringLiteral( "FILTER_GEOM" ) ) )
{
filterGeom.reset( new QgsGeometry( QgsGeometry::fromWkt( mParameters.value( QStringLiteral( "FILTER_GEOM" ) ) ) ) );
filterGeom.reset( new QgsGeometry( QgsGeometry::fromWkt( mParameters.value( QStringLiteral( "FILTER_GEOM" ) ) ) ) );
}

//In case the output image is distorted (WIDTH/HEIGHT ratio not equal to BBOX width/height), I and J need to be adapted as well
@@ -743,7 +743,7 @@ namespace QgsWms
{
featuresRect.reset( new QgsRectangle() );
}
else if( !filterGeom.get() )
else if ( !filterGeom.get() )
{
throw QgsBadRequestException( QStringLiteral( "ParameterMissing" ),
QStringLiteral( "I/J parameters are required for GetFeatureInfo" ) );
@@ -1254,7 +1254,7 @@ namespace QgsWms
const QString &version,
const QString &infoFormat,
QgsRectangle *featureBBox,
QgsGeometry* filterGeom ) const
QgsGeometry *filterGeom ) const
{
if ( !layer )
{
@@ -1273,7 +1273,7 @@ namespace QgsWms
{
searchRect = featureInfoSearchRect( layer, mapSettings, renderContext, *infoPoint );
}
else if( filterGeom )
else if ( filterGeom )
{
searchRect = filterGeom->boundingBox();
}
@@ -1306,9 +1306,9 @@ namespace QgsWms
fReq.setFlags( fReq.flags() & ~ QgsFeatureRequest::ExactIntersect );
}

if( filterGeom )
if ( filterGeom )
{
fReq.setFilterExpression( QString("intersects( $geometry, geom_from_wkt('%1') )").arg( filterGeom->exportToWkt() ) );
fReq.setFilterExpression( QString( "intersects( $geometry, geom_from_wkt('%1') )" ).arg( filterGeom->exportToWkt() ) );
}

#ifdef HAVE_SERVER_PYTHON_PLUGINS
@@ -224,7 +224,7 @@ namespace QgsWms
const QString &version,
const QString &infoFormat,
QgsRectangle *featureBBox = nullptr,
QgsGeometry* filterGeom = nullptr ) const;
QgsGeometry *filterGeom = nullptr ) const;
//! Appends feature info xml for the layer to the layer element of the dom document
bool featureInfoFromRasterLayer( QgsRasterLayer *layer,
const QgsMapSettings &mapSettings,
@@ -125,7 +125,7 @@ def test_project_wms(self):
'query_layers=testlayer%20%C3%A8%C3%A9&' +
'FEATURE_COUNT=10&FILTER=testlayer%20%C3%A8%C3%A9' + urllib.parse.quote(':"NAME" = \'two\' OR "utf8nameè" = \'three èé↓\''),
'wms_getfeatureinfo_filter_or_utf8')

# Test feature info request with filter geometry
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&' +

0 comments on commit e7ea972

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