[GRASS-SVN] r40376 - grass/branches/develbranch_6/db/drivers/ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 12 03:14:49 EST 2010


Author: neteler
Date: 2010-01-12 03:14:48 -0500 (Tue, 12 Jan 2010)
New Revision: 40376

Modified:
   grass/branches/develbranch_6/db/drivers/ogr/describe.c
   grass/branches/develbranch_6/db/drivers/ogr/fetch.c
Log:
activate OFTDate, OFTTime, OFTDateTime (treat as strings as in DBF driver)

Modified: grass/branches/develbranch_6/db/drivers/ogr/describe.c
===================================================================
--- grass/branches/develbranch_6/db/drivers/ogr/describe.c	2010-01-12 08:13:54 UTC (rev 40375)
+++ grass/branches/develbranch_6/db/drivers/ogr/describe.c	2010-01-12 08:14:48 UTC (rev 40376)
@@ -89,7 +89,8 @@
 	fieldName = OGR_Fld_GetNameRef(hFieldDefn);
 
 	if (ogrType != OFTInteger && ogrType != OFTReal &&
-	    ogrType != OFTString) {
+	    ogrType != OFTString  && ogrType != OFTDate && 
+	    ogrType != OFTTime    && ogrType != OFTDateTime ) {
 	    G_warning(_("OGR driver: column '%s', OGR type %d  is not supported"),
 		      fieldName, ogrType);
 	    cols[i] = 0;
@@ -147,6 +148,9 @@
 	    break;
 
 	case OFTString:
+	case OFTDate:
+	case OFTTime:
+	case OFTDateTime:
 	    sqlType = DB_SQL_TYPE_CHARACTER;
 	    size = OGR_Fld_GetWidth(hFieldDefn);
 	    if (size == 0) {

Modified: grass/branches/develbranch_6/db/drivers/ogr/fetch.c
===================================================================
--- grass/branches/develbranch_6/db/drivers/ogr/fetch.c	2010-01-12 08:13:54 UTC (rev 40375)
+++ grass/branches/develbranch_6/db/drivers/ogr/fetch.c	2010-01-12 08:14:48 UTC (rev 40376)
@@ -121,6 +121,9 @@
 	    break;
 
 	case OFTString:
+	case OFTDate:
+	case OFTTime:
+	case OFTDateTime:
 	    db_set_string(&(value->s),
 			  (char *)OGR_F_GetFieldAsString(c->hFeature, i));
 	    break;



More information about the grass-commit mailing list