瀏覽代碼

more debug info for ogr driver

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39559 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 年之前
父節點
當前提交
a823e6e9c5
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      db/drivers/ogr/describe.c

+ 8 - 6
db/drivers/ogr/describe.c

@@ -14,13 +14,15 @@
 *   	    	for details.
 *
 *****************************************************************************/
-#include <grass/dbmi.h>
-#include <grass/datetime.h>
+
 #include <grass/gis.h>
+#include <grass/datetime.h>
+#include <grass/dbmi.h>
+#include <grass/glocale.h>
+
 #include "ogr_api.h"
 #include "globals.h"
 #include "proto.h"
-#include <grass/glocale.h>
 
 int db__driver_describe_table(dbString * table_name, dbTable ** table)
 {
@@ -130,9 +132,6 @@ int describe_table(OGRLayerH hLayer, dbTable ** table, cursor * c)
 	ogrType = OGR_Fld_GetType(hFieldDefn);
 	fieldName = OGR_Fld_GetNameRef(hFieldDefn);
 
-	G_debug(3, "field %d : ogrType = %d, name = %s", i, ogrType,
-		fieldName);
-
 	switch (ogrType) {
 	case OFTInteger:
 	    sqlType = DB_SQL_TYPE_INTEGER;
@@ -162,6 +161,9 @@ int describe_table(OGRLayerH hLayer, dbTable ** table, cursor * c)
 	    break;
 	}
 
+	G_debug(3, "field %d : ogrType = %d, name = %s, size=%d precision=%d",
+		i, ogrType, fieldName, size, precision);
+
 	column = db_get_table_column(*table, i);
 
 	db_set_column_host_type(column, ogrType);