[GRASS-SVN] r73128 - grass/trunk/db/drivers/ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 21 05:33:20 PDT 2018


Author: mmetz
Date: 2018-08-21 05:33:20 -0700 (Tue, 21 Aug 2018)
New Revision: 73128

Modified:
   grass/trunk/db/drivers/ogr/execute.c
   grass/trunk/db/drivers/ogr/fetch.c
Log:
db driver ogr: fix handling of OFTInteger64

Modified: grass/trunk/db/drivers/ogr/execute.c
===================================================================
--- grass/trunk/db/drivers/ogr/execute.c	2018-08-21 11:47:50 UTC (rev 73127)
+++ grass/trunk/db/drivers/ogr/execute.c	2018-08-21 12:33:20 UTC (rev 73128)
@@ -96,6 +96,9 @@
 	    }
 	    else {
 		if ((cols[i].type != OFTInteger ||
+#if GDAL_VERSION_NUM >= 2000000
+		     cols[i].type != OFTInteger64 ||
+#endif
 		     cols[i].type != OFTReal) && *(cols[i].value) == '\'') {
 		    value = G_strchg(cols[i].value, '\'', ' ');
 		    G_strip(value);

Modified: grass/trunk/db/drivers/ogr/fetch.c
===================================================================
--- grass/trunk/db/drivers/ogr/fetch.c	2018-08-21 11:47:50 UTC (rev 73127)
+++ grass/trunk/db/drivers/ogr/fetch.c	2018-08-21 12:33:20 UTC (rev 73128)
@@ -144,6 +144,13 @@
 	    value->i = OGR_F_GetFieldAsInteger(c->hFeature, i);
 	    break;
 
+#if GDAL_VERSION_NUM >= 2000000
+        case OFTInteger64:
+	    /* test for integer overflow ? */
+	    value->i = OGR_F_GetFieldAsInteger64(c->hFeature, i);
+	    break;
+#endif
+
 	case OFTReal:
 	    value->d = OGR_F_GetFieldAsDouble(c->hFeature, i);
 	    break;



More information about the grass-commit mailing list