File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,13 @@ class CORE_EXPORT QgsJSONExporter
40
40
41
41
/* * Constructor for QgsJSONExporter.
42
42
* @param vectorLayer associated vector layer (required for related attribute export)
43
- * @param precision maximum number of decimal places to use for geometry coordinates
43
+ * @param precision maximum number of decimal places to use for geometry coordinates,
44
+ * the RFC 7946 GeoJSON specification recommends limiting coordinate precision to 6
44
45
*/
45
- QgsJSONExporter ( const QgsVectorLayer* vectorLayer = nullptr , int precision = 17 );
46
+ QgsJSONExporter ( const QgsVectorLayer* vectorLayer = nullptr , int precision = 6 );
46
47
47
48
/* * Sets the maximum number of decimal places to use in geometry coordinates.
49
+ * The RFC 7946 GeoJSON specification recommends limiting coordinate precision to 6
48
50
* @param precision number of decimal places
49
51
* @see precision()
50
52
*/
Original file line number Diff line number Diff line change @@ -1088,7 +1088,10 @@ namespace QgsWfs
1088
1088
1089
1089
QgsJSONExporter exporter;
1090
1090
exporter.setSourceCrs ( crs );
1091
- exporter.setPrecision ( prec );
1091
+ // QgsJSONExporter force transform geometry to ESPG:4326
1092
+ // and the RFC 7946 GeoJSON specification recommends limiting coordinate precision to 6
1093
+ Q_UNUSED ( prec );
1094
+ // exporter.setPrecision( prec );
1092
1095
1093
1096
// copy feature so we can modify its geometry as required
1094
1097
QgsFeature f ( *feat );
You can’t perform that action at this time.
0 commit comments