[GRASS-SVN] r45440 - grass/branches/develbranch_6/vector/v.out.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 20 14:31:33 EST 2011


Author: mmetz
Date: 2011-02-20 11:31:33 -0800 (Sun, 20 Feb 2011)
New Revision: 45440

Modified:
   grass/branches/develbranch_6/vector/v.out.ogr/main.c
Log:
also export attributes if multiple features share the same cat (backport from trunk r45439)

Modified: grass/branches/develbranch_6/vector/v.out.ogr/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.out.ogr/main.c	2011-02-20 19:29:34 UTC (rev 45439)
+++ grass/branches/develbranch_6/vector/v.out.ogr/main.c	2011-02-20 19:31:33 UTC (rev 45440)
@@ -1039,6 +1039,13 @@
 		if (db_fetch(&cursor, DB_NEXT, &more) != DB_OK)
 		    G_fatal_error(_("Unable to fetch data from table"));
 		if (!more) {
+		    /* start from the beginning in case multiple grass vector features
+		     * share the same category */
+		    if (db_fetch(&cursor, DB_NEXT, &more) != DB_OK)
+			G_fatal_error(_("Unable to fetch data from table"));
+		}
+
+		if (!more) {
 		    /* G_warning ("No database record for cat = %d", cat); */
 		    /* Set at least key column to category */
 		    if (!nocat) {



More information about the grass-commit mailing list