[GRASS-SVN] r55697 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 10 15:53:26 PDT 2013


Author: mmetz
Date: 2013-04-10 15:53:25 -0700 (Wed, 10 Apr 2013)
New Revision: 55697

Modified:
   grass/trunk/lib/vector/Vlib/ascii.c
Log:
Vlib: ascii export all features for field < 1

Modified: grass/trunk/lib/vector/Vlib/ascii.c
===================================================================
--- grass/trunk/lib/vector/Vlib/ascii.c	2013-04-10 21:20:23 UTC (rev 55696)
+++ grass/trunk/lib/vector/Vlib/ascii.c	2013-04-10 22:53:25 UTC (rev 55697)
@@ -362,7 +362,7 @@
     xstring = ystring = zstring = NULL;
     cats = NULL;
     
-    if (where || column_names) {
+    if (field > 0 && (where || column_names)) {
 	Fi = Vect_get_field(Map, field);
 	if (!Fi) {
 	    G_fatal_error(_("Database connection not defined for layer %d"),
@@ -513,7 +513,7 @@
 
 	found = get_cat(Cats, Clist, cats, ncats, field, &cat);
 
-	if (!found && ltype == GV_BOUNDARY &&
+	if (!found && field > 0 && ltype == GV_BOUNDARY &&
 	    type & GV_AREA && Vect_level(Map) > 1) {
 	    Vect_get_line_areas(Map, line, &left, &right);
 	    if (left < 0)
@@ -868,6 +868,9 @@
     
     *cat = -1;
     
+    if (field < 1)
+	return TRUE;
+    
     if (Clist && Clist->field == field) {
 	for (i = 0; i < Cats->n_cats; i++) {
 	    if (Cats->field[i] == field &&



More information about the grass-commit mailing list