Bug report #7638
MSSQL data provider rounds geometry on save
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||16559|
I've been using a data source coming from an MS SQL server table. I noticed on copying across points to the layer and saving it, the points end up in a slightly different position to the source.
More investigation points to the MS SQL data provider using WKT to insert/update geometry. Because it uses QgsGeometry::exportToWkt(), the WKT is rounded to 6 decimal places. For my source data, this resulted in inaccuracies of approximately 50mm or so.
There is a mUseWkb flag used in QgsMssqlProvider to determine whether WKT or WKB is used, but I have no idea how to set that option from within QGIS. Shouldn't the provider avoid rounding on updating, anyway?