[GRASS-SVN] r67742 - grass/branches/releasebranch_7_0/vector/v.in.ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 6 09:43:21 PST 2016
Author: martinl
Date: 2016-02-06 09:43:21 -0800 (Sat, 06 Feb 2016)
New Revision: 67742
Modified:
grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c
Log:
v.in.ogr: Support int64 for key column too, see #2769
(merge r66726, r66729 from trunk)
Modified: grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c 2016-02-06 15:25:05 UTC (rev 67741)
+++ grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c 2016-02-06 17:43:21 UTC (rev 67742)
@@ -1000,8 +1000,13 @@
/* check if the field is integer */
Ogr_field = OGR_FD_GetFieldDefn(Ogr_featuredefn, key_idx);
Ogr_ftype = OGR_Fld_GetType(Ogr_field);
- if (Ogr_ftype != OFTInteger)
+ if (!(Ogr_ftype == OFTInteger
+#if GDAL_VERSION_NUM >= 2000000
+ || Ogr_ftype == OFTInteger64
+#endif
+ )) {
G_fatal_error(_("Key column '%s' is not integer"), param.key->answer);
+ }
key_column = G_store(OGR_Fld_GetNameRef(Ogr_field));
}
}
@@ -1248,7 +1253,11 @@
}
else {
/* G_warning (_("Column value not set" )); */
- if (Ogr_ftype == OFTInteger || Ogr_ftype == OFTReal) {
+ if (Ogr_ftype == OFTInteger ||
+#if GDAL_VERSION_NUM >= 2000000
+ Ogr_ftype == OFTInteger64 ||
+#endif
+ Ogr_ftype == OFTReal) {
sprintf(buf, ", NULL");
}
#if GDAL_VERSION_NUM >= 1320
More information about the grass-commit
mailing list