[QGIS Commit] r8355 - trunk/qgis/src/providers/ogr
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Apr 16 22:08:49 EDT 2008
Author: jef
Date: 2008-04-16 22:08:49 -0400 (Wed, 16 Apr 2008)
New Revision: 8355
Modified:
trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
Log:
limit ogr integer fields to width 10, otherwise they become real
Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2008-04-16 15:41:24 UTC (rev 8354)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2008-04-17 02:08:49 UTC (rev 8355)
@@ -1208,6 +1208,7 @@
else if(it->second == "Integer")
{
OGRFieldDefnH field = OGR_Fld_Create(codec->fromUnicode(it->first).data(), OFTInteger);
+ OGR_Fld_SetWidth(field,10); // limit to 10. otherwise OGR sets it to 11 and recognizes as OFTDouble later
if(OGR_L_CreateField(layer,field,TRUE) != OGRERR_NONE)
{
QgsLogger::warning("creation of OFTInteger field failed");
More information about the QGIS-commit
mailing list