[GRASS-SVN] r51676 - grass/trunk/lib/vector/rtree
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 23 11:01:09 EDT 2012
Author: mmetz
Date: 2012-05-23 08:01:09 -0700 (Wed, 23 May 2012)
New Revision: 51676
Modified:
grass/trunk/lib/vector/rtree/index.c
grass/trunk/lib/vector/rtree/node.c
grass/trunk/lib/vector/rtree/split.h
Log:
rtree bugfix
Modified: grass/trunk/lib/vector/rtree/index.c
===================================================================
--- grass/trunk/lib/vector/rtree/index.c 2012-05-23 14:27:31 UTC (rev 51675)
+++ grass/trunk/lib/vector/rtree/index.c 2012-05-23 15:01:09 UTC (rev 51676)
@@ -37,6 +37,7 @@
struct RTree_Node *n;
int i;
+ assert(ndims > 0);
new_rtree = (struct RTree *)malloc(sizeof(struct RTree));
new_rtree->fd = fd;
Modified: grass/trunk/lib/vector/rtree/node.c
===================================================================
--- grass/trunk/lib/vector/rtree/node.c 2012-05-23 14:27:31 UTC (rev 51675)
+++ grass/trunk/lib/vector/rtree/node.c 2012-05-23 15:01:09 UTC (rev 51676)
@@ -65,7 +65,7 @@
n->level = -1;
for (i = 0; i < MAXCARD; i++)
- RTreeInitBranch[type](&(n->branch[i]), t);
+ RTreeInitBranch[type](t, &(n->branch[i]));
}
/* Make a new node and initialize to have all branch cells empty. */
@@ -461,7 +461,7 @@
rdist[i].distance += delta * delta;
}
- RTreeInitBranch[type](&(n->branch[i]));
+ RTreeInitBranch[type](t, &(n->branch[i]));
}
/* new branch */
Modified: grass/trunk/lib/vector/rtree/split.h
===================================================================
--- grass/trunk/lib/vector/rtree/split.h 2012-05-23 14:27:31 UTC (rev 51675)
+++ grass/trunk/lib/vector/rtree/split.h 2012-05-23 15:01:09 UTC (rev 51676)
@@ -33,10 +33,6 @@
RectReal area[2];
};
-extern struct RTree_Branch BranchBuf[MAXCARD + 1];
-extern int BranchCount;
-extern struct RTree_Rect CoverSplit;
-extern RectReal CoverSplitArea;
/* variables for finding a partition */
extern struct RTree_PartitionVars Partitions[1];
More information about the grass-commit
mailing list