Skip to content

Commit

Permalink
Indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 24, 2017
1 parent ef8e58b commit e7ea972
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -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
Expand All @@ -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" ) );
Expand Down Expand Up @@ -1254,7 +1254,7 @@ namespace QgsWms
const QString &version,
const QString &infoFormat,
QgsRectangle *featureBBox,
QgsGeometry* filterGeom ) const
QgsGeometry *filterGeom ) const
{
if ( !layer )
{
Expand All @@ -1273,7 +1273,7 @@ namespace QgsWms
{
searchRect = featureInfoSearchRect( layer, mapSettings, renderContext, *infoPoint );
}
else if( filterGeom )
else if ( filterGeom )
{
searchRect = filterGeom->boundingBox();
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsrenderer.h
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsserver_wms.py
Expand Up @@ -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&' +
Expand Down

0 comments on commit e7ea972

Please sign in to comment.