[GRASS-SVN] r40375 - grass/branches/releasebranch_6_4/db/drivers/ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 12 03:13:56 EST 2010
Author: neteler
Date: 2010-01-12 03:13:54 -0500 (Tue, 12 Jan 2010)
New Revision: 40375
Modified:
grass/branches/releasebranch_6_4/db/drivers/ogr/describe.c
grass/branches/releasebranch_6_4/db/drivers/ogr/fetch.c
Log:
activate OFTDate, OFTTime, OFTDateTime (treat as strings as in DBF driver)
Modified: grass/branches/releasebranch_6_4/db/drivers/ogr/describe.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/ogr/describe.c 2010-01-12 07:47:37 UTC (rev 40374)
+++ grass/branches/releasebranch_6_4/db/drivers/ogr/describe.c 2010-01-12 08:13:54 UTC (rev 40375)
@@ -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/releasebranch_6_4/db/drivers/ogr/fetch.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/ogr/fetch.c 2010-01-12 07:47:37 UTC (rev 40374)
+++ grass/branches/releasebranch_6_4/db/drivers/ogr/fetch.c 2010-01-12 08:13:54 UTC (rev 40375)
@@ -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