[GRASS-SVN] r53626 - grass/trunk/display/d.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 31 12:50:11 PDT 2012


Author: mmetz
Date: 2012-10-31 12:50:11 -0700 (Wed, 31 Oct 2012)
New Revision: 53626

Modified:
   grass/trunk/display/d.vect/area.c
Log:
d.vect: skip isles asap

Modified: grass/trunk/display/d.vect/area.c
===================================================================
--- grass/trunk/display/d.vect/area.c	2012-10-31 19:36:28 UTC (rev 53625)
+++ grass/trunk/display/d.vect/area.c	2012-10-31 19:50:11 UTC (rev 53626)
@@ -61,6 +61,11 @@
 	if (!Vect_area_alive(Map, area))
 	    continue;
 
+	centroid = Vect_get_area_centroid(Map, area);
+	if (!centroid) {
+	    continue;
+	}
+
 	/* Check box */
 	Vect_get_area_box(Map, area, &box);
 	if (box.N < window->south || box.S > window->north ||
@@ -84,7 +89,6 @@
 		    continue;
 	    }
 	    else {
-		centroid = Vect_get_area_centroid(Map, area);
 		G_debug(3, "centroid = %d", centroid);
 		if (centroid < 1)
 		    continue;
@@ -107,7 +111,6 @@
 	}
 	else if (Clist->field > 0) {
 	    found = FALSE;
-	    centroid = Vect_get_area_centroid(Map, area);
 	    G_debug(3, "\tcentroid = %d", centroid);
 	    if (centroid < 1)
 		continue;
@@ -159,7 +162,7 @@
 				(Clist->field > 0 ? Clist->field :
 				 (Cats->n_cats > 0 ? Cats->field[0] : 1)));
 
-	if (!Vect_get_area_centroid(Map, area) && cat == -1) {
+	if (cat == -1) {
 	    continue;
 	}
 



More information about the grass-commit mailing list