[GRASS-SVN] r44856 - grass/trunk/lib/vector/rtree
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 4 05:08:04 EST 2011
Author: mmetz
Date: 2011-01-04 02:08:04 -0800 (Tue, 04 Jan 2011)
New Revision: 44856
Modified:
grass/trunk/lib/vector/rtree/card.h
grass/trunk/lib/vector/rtree/indexf.c
grass/trunk/lib/vector/rtree/io.c
Log:
clean up comments
Modified: grass/trunk/lib/vector/rtree/card.h
===================================================================
--- grass/trunk/lib/vector/rtree/card.h 2011-01-04 10:01:42 UTC (rev 44855)
+++ grass/trunk/lib/vector/rtree/card.h 2011-01-04 10:08:04 UTC (rev 44856)
@@ -30,6 +30,5 @@
#define MAXKIDS(level, t) ((level) > 0 ? (t)->nodecard : (t)->leafcard)
#define MINFILL(level, t) ((level) > 0 ? (t)->minfill_node_split : (t)->minfill_leaf_split)
-//#define MINFILL(level, t) ((level) > 0 ? (t)->nodecard * 0.4 : (t)->leafcard * 0.4)
#endif
Modified: grass/trunk/lib/vector/rtree/indexf.c
===================================================================
--- grass/trunk/lib/vector/rtree/indexf.c 2011-01-04 10:01:42 UTC (rev 44855)
+++ grass/trunk/lib/vector/rtree/indexf.c 2011-01-04 10:08:04 UTC (rev 44856)
@@ -243,7 +243,6 @@
for (i = 0; i < MAXLEVEL; i++)
overflow[i] = 1;
- /* no R*-tree like forced reinsertion for file-based index ? */
result =
RTreeInsertRect2F(r, child, level, &newnode, &newnode_pos, t,
&reInsertList, overflow);
@@ -258,9 +257,9 @@
b.rect = RTreeNodeCover(&oldroot, t);
b.child.pos = t->rootpos;
RTreeAddBranch(&b, &newroot, NULL, NULL, NULL, NULL, t);
- /* branch for new node created by RTreeInsertRect2F */
+ /* branch for new node created by RTreeInsertRect2F() */
b.rect = RTreeNodeCover(&newnode, t);
- b.child.pos = newnode_pos; /* offset to new node as returned by RTreeInsertRect2F */
+ b.child.pos = newnode_pos; /* offset to new node as returned by RTreeInsertRect2F() */
RTreeAddBranch(&b, &newroot, NULL, NULL, NULL, NULL, t);
/* write new root node */
t->rootpos = RTreeGetNodePos(t);
@@ -290,7 +289,7 @@
b.rect = RTreeNodeCover(&oldroot, t);
b.child.pos = t->rootpos;
RTreeAddBranch(&b, &newroot, NULL, NULL, NULL, NULL, t);
- /* branch for new node created by RTreeFInsertRect2() */
+ /* branch for new node created by RTreeInsertRect2F() */
b.rect = RTreeNodeCover(&newnode, t);
b.child.pos = newnode_pos;
RTreeAddBranch(&b, &newroot, NULL, NULL, NULL, NULL, t);
@@ -387,8 +386,6 @@
nr = RTreeNodeCover(&(s[down].sn), t);
/* rewrite rect */
if (!RTreeCompareRect(&nr, &(s[top].sn.branch[i].rect), t)) {
- //s[top].sn.branch[i].rect = nr;
- //RTreeRewriteRect(&nr, s[top].pos, i, t);
RTreeUpdateRect(&nr, &(s[top].sn), s[top].pos, i, t);
}
}
Modified: grass/trunk/lib/vector/rtree/io.c
===================================================================
--- grass/trunk/lib/vector/rtree/io.c 2011-01-04 10:01:42 UTC (rev 44855)
+++ grass/trunk/lib/vector/rtree/io.c 2011-01-04 10:08:04 UTC (rev 44856)
@@ -121,6 +121,7 @@
t->mru[n->level] = which;
}
+/* flush pending changes to file */
void RTreeFlushBuffer(struct RTree *t)
{
int i;
More information about the grass-commit
mailing list