浏览代码

update vector modules for Vect_line_intersection()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55268 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 年之前
父节点
当前提交
d4246afe32
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 3 2
      vector/v.clean/prune.c
  2. 2 2
      vector/v.generalize/misc.c

+ 3 - 2
vector/v.clean/prune.c

@@ -49,7 +49,7 @@ prune(struct Map_info *Out, int otype, double thresh, struct Map_info *Err)
     TPoints = Vect_new_line_struct();
     BPoints = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
-    List = Vect_new_boxlist(0);
+    List = Vect_new_boxlist(1);
 
     nlines = Vect_get_num_lines(Out);
 
@@ -132,7 +132,8 @@ prune(struct Map_info *Out, int otype, double thresh, struct Map_info *Err)
 		 * intersections should be found if any */
 
 		AXLines = BXLines = NULL;
-		Vect_line_intersection(TPoints, BPoints, &AXLines, &BXLines,
+		Vect_line_intersection(TPoints, BPoints, &box, &List->box[i],
+		                       &AXLines, &BXLines,
 				       &naxlines, &nbxlines, 0);
 
 		G_debug(4,

+ 2 - 2
vector/v.generalize/misc.c

@@ -201,7 +201,7 @@ int check_topo(struct Map_info *Out, int line, struct line_pnts *APoints,
     if (!BPoints)
 	BPoints = Vect_new_line_struct();
     if (!List)
-	List = Vect_new_boxlist(0);
+	List = Vect_new_boxlist(1);
 
     /* Check intersection of the modified boundary with other boundaries */
     Vect_line_box(Points, &box);
@@ -223,7 +223,7 @@ int check_topo(struct Map_info *Out, int line, struct line_pnts *APoints,
 	 * intersections should be found if any */
 
 	AXLines = BXLines = NULL;
-	Vect_line_intersection(Points, BPoints, &AXLines, &BXLines,
+	Vect_line_intersection(Points, BPoints, &box, &List->box[i], &AXLines, &BXLines,
 			       &naxlines, &nbxlines, 0);
 
 	G_debug(4,