[GRASS-SVN] r52544 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 5 13:26:11 PDT 2012
Author: mmetz
Date: 2012-08-05 13:26:11 -0700 (Sun, 05 Aug 2012)
New Revision: 52544
Modified:
grass/trunk/lib/vector/Vlib/break_polygons.c
grass/trunk/lib/vector/Vlib/intersect.c
grass/trunk/lib/vector/Vlib/rtree_search.c
grass/trunk/lib/vector/Vlib/select.c
grass/trunk/lib/vector/Vlib/snap.c
Log:
Vlib: changed rtree search fn
Modified: grass/trunk/lib/vector/Vlib/break_polygons.c
===================================================================
--- grass/trunk/lib/vector/Vlib/break_polygons.c 2012-08-05 20:22:06 UTC (rev 52543)
+++ grass/trunk/lib/vector/Vlib/break_polygons.c 2012-08-05 20:26:11 UTC (rev 52544)
@@ -73,7 +73,7 @@
static int fpoint;
/* Function called from RTreeSearch for point found */
-void srch(int id, struct RTree_Rect rect, int *arg)
+void srch(int id, const struct RTree_Rect *rect, int *arg)
{
fpoint = id;
}
Modified: grass/trunk/lib/vector/Vlib/intersect.c
===================================================================
--- grass/trunk/lib/vector/Vlib/intersect.c 2012-08-05 20:22:06 UTC (rev 52543)
+++ grass/trunk/lib/vector/Vlib/intersect.c 2012-08-05 20:26:11 UTC (rev 52544)
@@ -84,7 +84,7 @@
static int ident(double x1, double y1, double x2, double y2, double thresh);
#endif
static int cross_seg(int id, struct RTree_Rect rect, int *arg);
-static int find_cross(int id, struct RTree_Rect rect, int *arg);
+static int find_cross(int id, const struct RTree_Rect *rect, int *arg);
#define D ((ax2-ax1)*(by1-by2) - (ay2-ay1)*(bx1-bx2))
#define D1 ((bx1-ax1)*(by1-by2) - (by1-ay1)*(bx1-bx2))
@@ -1089,7 +1089,7 @@
static int cross_found; /* set by find_cross() */
/* break segments (called by rtree search) */
-static int find_cross(int id, struct RTree_Rect rect, int *arg)
+static int find_cross(int id, const struct RTree_Rect *rect, int *arg)
{
double x1, y1, z1, x2, y2, z2;
int i, j, ret;
Modified: grass/trunk/lib/vector/Vlib/rtree_search.c
===================================================================
--- grass/trunk/lib/vector/Vlib/rtree_search.c 2012-08-05 20:22:06 UTC (rev 52543)
+++ grass/trunk/lib/vector/Vlib/rtree_search.c 2012-08-05 20:26:11 UTC (rev 52544)
@@ -19,7 +19,7 @@
/* Function to add the ids of overlapping rectangles to an ilist
* This function is a callback function used in RTreeSearch2()
* */
-static int add_id_to_list(int id, struct RTree_Rect rect, void *list)
+static int add_id_to_list(int id, const struct RTree_Rect *rect, void *list)
{
struct ilist *l = (struct ilist*)list;
G_ilist_add(l, id);
Modified: grass/trunk/lib/vector/Vlib/select.c
===================================================================
--- grass/trunk/lib/vector/Vlib/select.c 2012-08-05 20:22:06 UTC (rev 52543)
+++ grass/trunk/lib/vector/Vlib/select.c 2012-08-05 20:26:11 UTC (rev 52544)
@@ -118,7 +118,7 @@
/************************* SELECT BY BOX *********************************/
/* This function is called by RTreeSearch() to add selected item to the list */
-static int _add_item(int id, struct RTree_Rect rect, struct ilist *list)
+static int _add_item(int id, const struct RTree_Rect *rect, struct ilist *list)
{
G_ilist_add(list, id);
return 1;
Modified: grass/trunk/lib/vector/Vlib/snap.c
===================================================================
--- grass/trunk/lib/vector/Vlib/snap.c 2012-08-05 20:22:06 UTC (rev 52543)
+++ grass/trunk/lib/vector/Vlib/snap.c 2012-08-05 20:26:11 UTC (rev 52544)
@@ -41,7 +41,7 @@
} NEW;
/* This function is called by RTreeSearch() to add selected node/line/area/isle to the list */
-int add_item(int id, struct RTree_Rect rect, struct ilist *list)
+int add_item(int id, const struct RTree_Rect *rect, struct ilist *list)
{
G_ilist_add(list, id);
return 1;
More information about the grass-commit
mailing list