mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
[MSSQL] Better fix to removing MZ. Thanks to Nyall ;)
This commit is contained in:
parent
c793a922e9
commit
b69861210a
@ -999,8 +999,7 @@ bool QgsMssqlProvider::addFeatures( QgsFeatureList &flist, Flags flags )
|
||||
// Z and M on the end of a WKT string isn't valid for
|
||||
// SQL Server so we have to remove it first.
|
||||
wkt = geom.exportToWkt();
|
||||
wkt = wkt.replace( "Z", "" );
|
||||
wkt = wkt.replace( "M", "" );
|
||||
wkt.replace(QRegExp("[mzMZ]+\\s*\\("), "(");
|
||||
}
|
||||
query.addBindValue( wkt );
|
||||
}
|
||||
@ -1336,9 +1335,7 @@ bool QgsMssqlProvider::changeGeometryValues( const QgsGeometryMap &geometry_map
|
||||
QString wkt = it->exportToWkt();
|
||||
// Z and M on the end of a WKT string isn't valid for
|
||||
// SQL Server so we have to remove it first.
|
||||
wkt = wkt.replace( "Z", "" );
|
||||
wkt = wkt.replace( "M", "" );
|
||||
QgsDebugMsg( wkt );
|
||||
wkt.replace(QRegExp("[mzMZ]+\\s*\\("), "(");
|
||||
query.addBindValue( wkt );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user