Skip to content
Permalink
Browse files

GDAL 2.0 allows writing 64bit longlong integers

Fix #14411
  • Loading branch information
m-kuhn committed Mar 15, 2016
1 parent 25ac01a commit e135699a40c78b0256295ebd79b8881405efa8a9
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/qgsvectorfilewriter.cpp
@@ -362,12 +362,19 @@ void QgsVectorFileWriter::init( QString vectorFileName, QString fileEncoding, co

switch ( attrField.type() )
{
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM < 2000000
case QVariant::LongLong:
ogrType = OFTString;
ogrWidth = ogrWidth > 0 && ogrWidth <= 21 ? ogrWidth : 21;
ogrPrecision = -1;
break;

#else
case QVariant::LongLong:
ogrType = OFTInteger64;
ogrWidth = ogrWidth > 0 && ogrWidth <= 20 ? ogrWidth : 20;
ogrPrecision = 0;
break;
#endif
case QVariant::String:
ogrType = OFTString;
if ( ogrWidth <= 0 || ogrWidth > 255 )

0 comments on commit e135699

Please sign in to comment.
You can’t perform that action at this time.