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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 27 09:34:23 EDT 2011


Author: martinl
Date: 2011-10-27 06:34:22 -0700 (Thu, 27 Oct 2011)
New Revision: 48964

Modified:
   grass/trunk/display/d.vect/topo.c
Log:
d.vect: revert r48453


Modified: grass/trunk/display/d.vect/topo.c
===================================================================
--- grass/trunk/display/d.vect/topo.c	2011-10-27 11:49:22 UTC (rev 48963)
+++ grass/trunk/display/d.vect/topo.c	2011-10-27 13:34:22 UTC (rev 48964)
@@ -7,10 +7,10 @@
 
 int display_topo(struct Map_info *Map, int type, LATTR *lattr)
 {
-    int ltype, num, el, left, right;
+    int ltype, num, el;
     struct line_pnts *Points;
     struct line_cats *Cats;
-    char text[100];
+    char text[50];
     LATTR lattr2 = *lattr;
 
     if (Vect_level(Map) < 2) {
@@ -21,7 +21,7 @@
     }
     
     lattr2.xref = lattr->xref == LRIGHT ? LLEFT : LRIGHT;
-        
+
     G_debug(1, "display topo:");
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
@@ -54,16 +54,7 @@
 	if (!(type & ltype))
 	    continue;		/* used for both lines and labels */
 
-	if (ltype == GV_BOUNDARY) {
-	    Vect_get_line_areas(Map, el, &left, &right);
-	    sprintf(text, "%d (L%d/R%d)", el, left, right);
-	}
-	else if (ltype == GV_CENTROID) {
-	    sprintf(text, "%d (A%d)", el, Vect_get_centroid_area(Map, el));
-	}
-	else {
-	    sprintf(text, "%d", el);
-	}
+	sprintf(text, "%d", el);
 	show_label_line(Points, ltype, lattr, text);
     }
 
@@ -78,7 +69,7 @@
 	Vect_get_node_coor(Map, el, &X, &Y, NULL);
 	G_debug(3, "node = %d", el);
 	sprintf(text, "n%d", el);
-	
+
 	show_label(&X, &Y, &lattr2, text);
 
 	D_plot_icon(X, Y, G_ICON_BOX, 0, 10);



More information about the grass-commit mailing list