@@ -1286,11 +1286,11 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
1286
1286
int gmlVersion = infoFormat.startsWith ( " application/vnd.ogc.gml/3" ) ? 3 : 2 ;
1287
1287
if ( gmlVersion < 3 )
1288
1288
{
1289
- boxElem = QgsOgcUtils::rectangleToGMLBox ( featuresRect, result );
1289
+ boxElem = QgsOgcUtils::rectangleToGMLBox ( featuresRect, result, 8 );
1290
1290
}
1291
1291
else
1292
1292
{
1293
- boxElem = QgsOgcUtils::rectangleToGMLEnvelope ( featuresRect, result );
1293
+ boxElem = QgsOgcUtils::rectangleToGMLEnvelope ( featuresRect, result, 8 );
1294
1294
}
1295
1295
1296
1296
QgsCoordinateReferenceSystem crs = mMapRenderer ->destinationCrs ();
@@ -1305,10 +1305,10 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
1305
1305
{
1306
1306
QDomElement bBoxElem = result.createElement ( " BoundingBox" );
1307
1307
bBoxElem.setAttribute ( " CRS" , mMapRenderer ->destinationCrs ().authid () );
1308
- bBoxElem.setAttribute ( " minx" , QString::number ( featuresRect->xMinimum () ) );
1309
- bBoxElem.setAttribute ( " maxx" , QString::number ( featuresRect->xMaximum () ) );
1310
- bBoxElem.setAttribute ( " miny" , QString::number ( featuresRect->yMinimum () ) );
1311
- bBoxElem.setAttribute ( " maxy" , QString::number ( featuresRect->yMaximum () ) );
1308
+ bBoxElem.setAttribute ( " minx" , qgsDoubleToString ( featuresRect->xMinimum (), 8 ) );
1309
+ bBoxElem.setAttribute ( " maxx" , qgsDoubleToString ( featuresRect->xMaximum (), 8 ) );
1310
+ bBoxElem.setAttribute ( " miny" , qgsDoubleToString ( featuresRect->yMinimum (), 8 ) );
1311
+ bBoxElem.setAttribute ( " maxy" , qgsDoubleToString ( featuresRect->yMaximum (), 8 ) );
1312
1312
getFeatureInfoElement.insertBefore ( bBoxElem, QDomNode () ); // insert as first child
1313
1313
}
1314
1314
}
@@ -1830,10 +1830,10 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
1830
1830
{
1831
1831
QDomElement bBoxElem = infoDocument.createElement ( " BoundingBox" );
1832
1832
bBoxElem.setAttribute ( version == " 1.1.1" ? " SRS" : " CRS" , outputCrs.authid () );
1833
- bBoxElem.setAttribute ( " minx" , QString::number ( box.xMinimum () ) );
1834
- bBoxElem.setAttribute ( " maxx" , QString::number ( box.xMaximum () ) );
1835
- bBoxElem.setAttribute ( " miny" , QString::number ( box.yMinimum () ) );
1836
- bBoxElem.setAttribute ( " maxy" , QString::number ( box.yMaximum () ) );
1833
+ bBoxElem.setAttribute ( " minx" , qgsDoubleToString ( box.xMinimum (), 8 ) );
1834
+ bBoxElem.setAttribute ( " maxx" , qgsDoubleToString ( box.xMaximum (), 8 ) );
1835
+ bBoxElem.setAttribute ( " miny" , qgsDoubleToString ( box.yMinimum (), 8 ) );
1836
+ bBoxElem.setAttribute ( " maxy" , qgsDoubleToString ( box.yMaximum (), 8 ) );
1837
1837
featureElement.appendChild ( bBoxElem );
1838
1838
}
1839
1839
@@ -1851,7 +1851,7 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
1851
1851
}
1852
1852
QDomElement geometryElement = infoDocument.createElement ( " Attribute" );
1853
1853
geometryElement.setAttribute ( " name" , " geometry" );
1854
- geometryElement.setAttribute ( " value" , geom->exportToWkt () );
1854
+ geometryElement.setAttribute ( " value" , geom->exportToWkt ( 8 ) );
1855
1855
geometryElement.setAttribute ( " type" , " derived" );
1856
1856
featureElement.appendChild ( geometryElement );
1857
1857
}
@@ -2836,11 +2836,11 @@ QDomElement QgsWMSServer::createFeatureGML(
2836
2836
QDomElement boxElem;
2837
2837
if ( version < 3 )
2838
2838
{
2839
- boxElem = QgsOgcUtils::rectangleToGMLBox ( &box, doc );
2839
+ boxElem = QgsOgcUtils::rectangleToGMLBox ( &box, doc, 8 );
2840
2840
}
2841
2841
else
2842
2842
{
2843
- boxElem = QgsOgcUtils::rectangleToGMLEnvelope ( &box, doc );
2843
+ boxElem = QgsOgcUtils::rectangleToGMLEnvelope ( &box, doc, 8 );
2844
2844
}
2845
2845
2846
2846
if ( crs.isValid () )
@@ -2864,11 +2864,11 @@ QDomElement QgsWMSServer::createFeatureGML(
2864
2864
QDomElement gmlElem;
2865
2865
if ( version < 3 )
2866
2866
{
2867
- gmlElem = QgsOgcUtils::geometryToGML ( geom, doc );
2867
+ gmlElem = QgsOgcUtils::geometryToGML ( geom, doc, 8 );
2868
2868
}
2869
2869
else
2870
2870
{
2871
- gmlElem = QgsOgcUtils::geometryToGML ( geom, doc, " GML3" );
2871
+ gmlElem = QgsOgcUtils::geometryToGML ( geom, doc, " GML3" , 8 );
2872
2872
}
2873
2873
2874
2874
if ( !gmlElem.isNull () )
0 commit comments