[GRASS-SVN] r45439 - grass/trunk/vector/v.out.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 20 14:29:34 EST 2011


Author: mmetz
Date: 2011-02-20 11:29:34 -0800 (Sun, 20 Feb 2011)
New Revision: 45439

Modified:
   grass/trunk/vector/v.out.ogr/attrb.c
Log:
also export attributes if multiple features share the same cat

Modified: grass/trunk/vector/v.out.ogr/attrb.c
===================================================================
--- grass/trunk/vector/v.out.ogr/attrb.c	2011-02-19 18:45:27 UTC (rev 45438)
+++ grass/trunk/vector/v.out.ogr/attrb.c	2011-02-20 19:29:34 UTC (rev 45439)
@@ -31,6 +31,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