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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 12 05:24:23 EST 2010


Author: mmetz
Date: 2010-01-12 05:24:23 -0500 (Tue, 12 Jan 2010)
New Revision: 40383

Modified:
   grass/trunk/lib/vector/Vlib/sindex.c
Log:
select 3D lines with 2D polygon

Modified: grass/trunk/lib/vector/Vlib/sindex.c
===================================================================
--- grass/trunk/lib/vector/Vlib/sindex.c	2010-01-12 10:07:54 UTC (rev 40382)
+++ grass/trunk/lib/vector/Vlib/sindex.c	2010-01-12 10:24:23 UTC (rev 40383)
@@ -90,15 +90,16 @@
 			 struct ilist *list)
 {
     int i;
-    const char *dstr;
-    int debug_level;
+    static int debug_level = -1;
 
-    dstr = G__getenv("DEBUG");
+    if (debug_level == -1) {
+	const char *dstr = G__getenv("DEBUG");
 
-    if (dstr != NULL)
-	debug_level = atoi(dstr);
-    else
-	debug_level = 0;
+	if (dstr != NULL)
+	    debug_level = atoi(dstr);
+	else
+	    debug_level = 0;
+    }
 
     G_debug(3, "Vect_select_areas_by_box()");
     G_debug(3, "Box(N,S,E,W,T,B): %e, %e, %e, %e, %e, %e", Box->N, Box->S,
@@ -224,6 +225,8 @@
 
     /* Select first all lines by box */
     dig_line_box(Polygon, &box);
+    box.T = PORT_DOUBLE_MAX;
+    box.B = -PORT_DOUBLE_MAX;
     Vect_select_lines_by_box(Map, &box, type, LocList);
     G_debug(3, "  %d lines selected by box", LocList->n_values);
 



More information about the grass-commit mailing list