@@ -1554,10 +1554,10 @@ namespace QgsWms
1554
1554
{
1555
1555
QDomElement bBoxElem = infoDocument.createElement ( QStringLiteral ( " BoundingBox" ) );
1556
1556
bBoxElem.setAttribute ( version == QLatin1String ( " 1.1.1" ) ? " SRS" : " CRS" , outputCrs.authid () );
1557
- bBoxElem.setAttribute ( QStringLiteral ( " minx" ), qgsDoubleToString ( box.xMinimum (), wmsPrecision () ) );
1558
- bBoxElem.setAttribute ( QStringLiteral ( " maxx" ), qgsDoubleToString ( box.xMaximum (), wmsPrecision () ) );
1559
- bBoxElem.setAttribute ( QStringLiteral ( " miny" ), qgsDoubleToString ( box.yMinimum (), wmsPrecision () ) );
1560
- bBoxElem.setAttribute ( QStringLiteral ( " maxy" ), qgsDoubleToString ( box.yMaximum (), wmsPrecision () ) );
1557
+ bBoxElem.setAttribute ( QStringLiteral ( " minx" ), qgsDoubleToString ( box.xMinimum (), mContext . precision () ) );
1558
+ bBoxElem.setAttribute ( QStringLiteral ( " maxx" ), qgsDoubleToString ( box.xMaximum (), mContext . precision () ) );
1559
+ bBoxElem.setAttribute ( QStringLiteral ( " miny" ), qgsDoubleToString ( box.yMinimum (), mContext . precision () ) );
1560
+ bBoxElem.setAttribute ( QStringLiteral ( " maxy" ), qgsDoubleToString ( box.yMaximum (), mContext . precision () ) );
1561
1561
featureElement.appendChild ( bBoxElem );
1562
1562
}
1563
1563
@@ -1588,7 +1588,7 @@ namespace QgsWms
1588
1588
}
1589
1589
QDomElement geometryElement = infoDocument.createElement ( QStringLiteral ( " Attribute" ) );
1590
1590
geometryElement.setAttribute ( QStringLiteral ( " name" ), QStringLiteral ( " geometry" ) );
1591
- geometryElement.setAttribute ( QStringLiteral ( " value" ), geom.asWkt ( wmsPrecision () ) );
1591
+ geometryElement.setAttribute ( QStringLiteral ( " value" ), geom.asWkt ( mContext . precision () ) );
1592
1592
geometryElement.setAttribute ( QStringLiteral ( " type" ), QStringLiteral ( " derived" ) );
1593
1593
featureElement.appendChild ( geometryElement );
1594
1594
}
@@ -2260,11 +2260,11 @@ namespace QgsWms
2260
2260
QDomElement boxElem;
2261
2261
if ( version < 3 )
2262
2262
{
2263
- boxElem = QgsOgcUtils::rectangleToGMLBox ( &box, doc, wmsPrecision () );
2263
+ boxElem = QgsOgcUtils::rectangleToGMLBox ( &box, doc, mContext . precision () );
2264
2264
}
2265
2265
else
2266
2266
{
2267
- boxElem = QgsOgcUtils::rectangleToGMLEnvelope ( &box, doc, wmsPrecision () );
2267
+ boxElem = QgsOgcUtils::rectangleToGMLEnvelope ( &box, doc, mContext . precision () );
2268
2268
}
2269
2269
2270
2270
if ( crs.isValid () )
@@ -2288,11 +2288,11 @@ namespace QgsWms
2288
2288
QDomElement gmlElem;
2289
2289
if ( version < 3 )
2290
2290
{
2291
- gmlElem = QgsOgcUtils::geometryToGML ( geom, doc, wmsPrecision () );
2291
+ gmlElem = QgsOgcUtils::geometryToGML ( geom, doc, mContext . precision () );
2292
2292
}
2293
2293
else
2294
2294
{
2295
- gmlElem = QgsOgcUtils::geometryToGML ( geom, doc, QStringLiteral ( " GML3" ), wmsPrecision () );
2295
+ gmlElem = QgsOgcUtils::geometryToGML ( geom, doc, QStringLiteral ( " GML3" ), mContext . precision () );
2296
2296
}
2297
2297
2298
2298
if ( !gmlElem.isNull () )
@@ -2365,34 +2365,6 @@ namespace QgsWms
2365
2365
return value;
2366
2366
}
2367
2367
2368
- int QgsRenderer::imageQuality () const
2369
- {
2370
- // First taken from QGIS project
2371
- int imageQuality = QgsServerProjectUtils::wmsImageQuality ( *mProject );
2372
-
2373
- // Then checks if a parameter is given, if so use it instead
2374
- if ( !mWmsParameters .imageQuality ().isEmpty () )
2375
- {
2376
- imageQuality = mWmsParameters .imageQualityAsInt ();
2377
- }
2378
-
2379
- return imageQuality;
2380
- }
2381
-
2382
- int QgsRenderer::wmsPrecision () const
2383
- {
2384
- // First taken from QGIS project and the default value is 6
2385
- int WMSPrecision = QgsServerProjectUtils::wmsFeatureInfoPrecision ( *mProject );
2386
-
2387
- // Then checks if a parameter is given, if so use it instead
2388
- int WMSPrecisionParameter = mWmsParameters .wmsPrecisionAsInt ();
2389
-
2390
- if ( WMSPrecisionParameter > -1 )
2391
- return WMSPrecisionParameter;
2392
- else
2393
- return WMSPrecision;
2394
- }
2395
-
2396
2368
QgsRectangle QgsRenderer::featureInfoSearchRect ( QgsVectorLayer *ml, const QgsMapSettings &mapSettings, const QgsRenderContext &rct, const QgsPointXY &infoPoint ) const
2397
2369
{
2398
2370
if ( !ml )
0 commit comments