Browse Source

Vlib: changed rtree search fn

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52544 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 years ago
parent
commit
f9b103cf33

+ 1 - 1
lib/vector/Vlib/break_polygons.c

@@ -73,7 +73,7 @@ typedef struct
 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;
 }

+ 2 - 2
lib/vector/Vlib/intersect.c

@@ -84,7 +84,7 @@ static int debug_level = -1;
 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 struct line_pnts *APnts, *BPnts, *IPnts;
 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;

+ 1 - 1
lib/vector/Vlib/rtree_search.c

@@ -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);

+ 1 - 1
lib/vector/Vlib/select.c

@@ -118,7 +118,7 @@ void Vect_spatial_index_del_item(struct spatial_index * si, int id,
 
 /************************* 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;

+ 1 - 1
lib/vector/Vlib/snap.c

@@ -41,7 +41,7 @@ typedef struct
 } 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;