[GRASS-SVN] r46942 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 3 13:58:22 EDT 2011
Author: mmetz
Date: 2011-07-03 10:58:22 -0700 (Sun, 03 Jul 2011)
New Revision: 46942
Modified:
grass/trunk/lib/vector/Vlib/break_polygons.c
grass/trunk/lib/vector/Vlib/intersect.c
grass/trunk/lib/vector/Vlib/select.c
grass/trunk/lib/vector/Vlib/snap.c
Log:
changed RTree struct names: update Vlib
Modified: grass/trunk/lib/vector/Vlib/break_polygons.c
===================================================================
--- grass/trunk/lib/vector/Vlib/break_polygons.c 2011-07-03 17:57:56 UTC (rev 46941)
+++ grass/trunk/lib/vector/Vlib/break_polygons.c 2011-07-03 17:58:22 UTC (rev 46942)
@@ -73,7 +73,7 @@
static int fpoint;
/* Function called from RTreeSearch for point found */
-void srch(int id, struct Rect rect, int *arg)
+void srch(int id, struct RTree_Rect rect, int *arg)
{
fpoint = id;
}
@@ -114,7 +114,7 @@
struct RTree *RTree;
int apoints, npoints, nallpoints, nmarks;
XPNT2 XPnt;
- struct Rect rect;
+ struct RTree_Rect rect;
double dx, dy, a1 = 0, a2 = 0;
int closed, last_point;
char cross;
Modified: grass/trunk/lib/vector/Vlib/intersect.c
===================================================================
--- grass/trunk/lib/vector/Vlib/intersect.c 2011-07-03 17:57:56 UTC (rev 46941)
+++ grass/trunk/lib/vector/Vlib/intersect.c 2011-07-03 17:58:22 UTC (rev 46942)
@@ -81,8 +81,8 @@
#if 0
static int ident(double x1, double y1, double x2, double y2, double thresh);
#endif
-static int cross_seg(int id, struct Rect rect, int *arg);
-static int find_cross(int id, struct Rect rect, int *arg);
+static int cross_seg(int id, struct RTree_Rect rect, int *arg);
+static int find_cross(int id, 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))
@@ -540,7 +540,7 @@
static struct line_pnts *APnts, *BPnts;
/* break segments (called by rtree search) */
-static int cross_seg(int id, struct Rect rect, int *arg)
+static int cross_seg(int id, struct RTree_Rect rect, int *arg)
{
double x1, y1, z1, x2, y2, z2;
int i, j, ret;
@@ -606,9 +606,9 @@
int n_alive_cross;
double dist, curdist, last_dist, last_x, last_y, last_z;
double x, y, rethresh;
- struct Rect rect;
struct line_pnts **XLines, *Points;
struct RTree *MyRTree;
+ struct RTree_Rect rect;
struct line_pnts *Points1, *Points2; /* first, second points */
int seg1, seg2, vert1, vert2;
@@ -1070,7 +1070,7 @@
static int cross_found; /* set by find_cross() */
/* break segments (called by rtree search) */
-static int find_cross(int id, struct Rect rect, int *arg)
+static int find_cross(int id, struct RTree_Rect rect, int *arg)
{
double x1, y1, z1, x2, y2, z2;
int i, j, ret;
@@ -1133,7 +1133,7 @@
{
int i;
double dist, rethresh;
- struct Rect rect;
+ struct RTree_Rect rect;
struct RTree *MyRTree;
rethresh = 0.000001; /* TODO */
Modified: grass/trunk/lib/vector/Vlib/select.c
===================================================================
--- grass/trunk/lib/vector/Vlib/select.c 2011-07-03 17:57:56 UTC (rev 46941)
+++ grass/trunk/lib/vector/Vlib/select.c 2011-07-03 17:58:22 UTC (rev 46942)
@@ -62,7 +62,7 @@
void Vect_spatial_index_add_item(struct spatial_index * si, int id,
const struct bound_box * box)
{
- struct Rect rect;
+ struct RTree_Rect rect;
G_debug(3, "Vect_spatial_index_add_item(): id = %d", id);
@@ -87,7 +87,7 @@
const struct bound_box * box)
{
int ret;
- struct Rect rect;
+ struct RTree_Rect rect;
G_debug(3, "Vect_spatial_index_del_item(): id = %d", id);
@@ -106,7 +106,7 @@
/************************* SELECT BY BOX *********************************/
/* This function is called by RTreeSearch() to add selected item to the list */
-static int _add_item(int id, struct Rect rect, struct ilist *list)
+static int _add_item(int id, struct RTree_Rect rect, struct ilist *list)
{
dig_list_add(list, id);
return 1;
@@ -125,7 +125,7 @@
Vect_spatial_index_select(const struct spatial_index * si, const struct bound_box * box,
struct ilist *list)
{
- struct Rect rect;
+ struct RTree_Rect rect;
G_debug(3, "Vect_spatial_index_select()");
Modified: grass/trunk/lib/vector/Vlib/snap.c
===================================================================
--- grass/trunk/lib/vector/Vlib/snap.c 2011-07-03 17:57:56 UTC (rev 46941)
+++ grass/trunk/lib/vector/Vlib/snap.c 2011-07-03 17:58:22 UTC (rev 46942)
@@ -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 Rect rect, struct ilist *list)
+int add_item(int id, struct RTree_Rect rect, struct ilist *list)
{
dig_list_add(list, id);
return 1;
@@ -95,6 +95,7 @@
struct RTree *RTree;
int rtreefd = -1;
+ struct RTree_Rect rect;
int point; /* index in points array */
int nanchors, ntosnap; /* number of anchors and number of points to be snapped */
int nsnapped, ncreated; /* number of snapped verices, number of new vertices (on segments) */
@@ -102,7 +103,6 @@
XPNT *XPnts; /* Array of points */
NEW *New = NULL; /* Array of new points */
int anew = 0, nnew; /* allocated new points , number of new points */
- struct Rect rect;
struct ilist *List;
int *Index = NULL; /* indexes of anchors for vertices */
int aindex = 0; /* allocated Index */
More information about the grass-commit
mailing list