[GRASS-SVN] r47017 - grass/trunk/vector/v.distance

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 6 08:08:47 EDT 2011


Author: mmetz
Date: 2011-07-06 05:08:46 -0700 (Wed, 06 Jul 2011)
New Revision: 47017

Modified:
   grass/trunk/vector/v.distance/main.c
Log:
sync Vect_point_in_area() to the other Vect_point_in_*() functions: update v.distance

Modified: grass/trunk/vector/v.distance/main.c
===================================================================
--- grass/trunk/vector/v.distance/main.c	2011-07-06 12:08:11 UTC (rev 47016)
+++ grass/trunk/vector/v.distance/main.c	2011-07-06 12:08:46 UTC (rev 47017)
@@ -504,7 +504,7 @@
     TPoints = Vect_new_line_struct();
     FCats = Vect_new_cats_struct();
     TCats = Vect_new_cats_struct();
-    List = Vect_new_boxlist(0);
+    List = Vect_new_boxlist(1);
 
     /* Allocate space ( may be more than needed (duplicate cats and elements without cats) ) */
     nfrom = Vect_get_num_lines(&From);
@@ -822,7 +822,7 @@
 		    Vect_get_area_points(&To, area, TPoints);
 
 		    /* Find the distance to this area */
-		    if (Vect_point_in_area(&To, area, FPoints->x[0], FPoints->y[0])) {	/* in area */
+		    if (Vect_point_in_area(FPoints->x[0], FPoints->y[0], &To, area, List->box[i])) {	/* in area */
 			tmp_dist = 0;
 			tmp_tx = FPoints->x[0];
 			tmp_ty = FPoints->y[0];



More information about the grass-commit mailing list