GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
#include "rtree.h"
Go to the source code of this file.
Data Structures | |
struct | RTree_ListNode |
struct | RTree_ListFNode |
struct | RTree_ListBranch |
Macros | |
#define | PGSIZE 512 |
#define | FORCECARD 3 |
#define | NODETYPE(l, fd) ((l) == 0 ? 0 : ((fd) < 0 ? 1 : 2)) |
#define | RTreeCopyRect(r1, r2, t) memcpy((r1)->boundary, (r2)->boundary, (t)->rectsize) |
int RTreeAddBranch | ( | struct RTree_Branch * | b, |
struct RTree_Node * | n, | ||
struct RTree_Node ** | newnode, | ||
struct RTree_ListBranch ** | ee, | ||
struct RTree_Rect * | cover, | ||
char * | overflow, | ||
struct RTree * | t | ||
) |
Definition at line 544 of file node.c.
References b, RTree_Node::branch, RTree_Branch::child, RTree_Node::count, RTree_Child::id, RTree_Node::level, MAXKIDS, RTree_Branch::rect, RTreeCopyRect, and t.
void RTreeAddNodePos | ( | off_t | pos, |
int | level, | ||
struct RTree * | t | ||
) |
Definition at line 31 of file io.c.
References assert, NODE_BUFFER_SIZE, and t.
void RTreeCombineRect | ( | struct RTree_Rect * | r1, |
struct RTree_Rect * | r2, | ||
struct RTree_Rect * | r3, | ||
struct RTree * | t | ||
) |
int RTreeCompareRect | ( | struct RTree_Rect * | r, |
struct RTree_Rect * | s, | ||
struct RTree * | t | ||
) |
void RTreeCopyBranch | ( | struct RTree_Branch * | b1, |
struct RTree_Branch * | b2, | ||
struct RTree * | t | ||
) |
Definition at line 124 of file node.c.
References RTree_Branch::child, RTree_Branch::rect, RTreeCopyRect, and t.
Referenced by RTreeCopyNode().
int RTreeDeleteRectF | ( | struct RTree_Rect * | r, |
union RTree_Child | child, | ||
struct RTree * | t | ||
) |
int RTreeDeleteRectM | ( | struct RTree_Rect * | r, |
union RTree_Child | child, | ||
struct RTree * | t | ||
) |
void RTreeDisconnectBranch | ( | struct RTree_Node * | n, |
int | i, | ||
struct RTree * | t | ||
) |
Definition at line 270 of file node.c.
References assert, RTree_Node::branch, RTree_Branch::child, and t.
int RTreeExpandRect | ( | struct RTree_Rect * | r1, |
struct RTree_Rect * | r2, | ||
struct RTree * | t | ||
) |
Definition at line 536 of file rect.c.
References RTree_Rect::boundary, t, and Undefined.
Referenced by RTreeNodeCover().
void RTreeFreeListBranch | ( | struct RTree_ListBranch * | p | ) |
Definition at line 392 of file vector/rtree/index.c.
References RTree_ListBranch::b, free(), RTree_Branch::rect, and RTreeFreeBoundary().
void RTreeFreeListNode | ( | struct RTree_ListNode * | p | ) |
Definition at line 371 of file vector/rtree/index.c.
References free().
struct RTree_Node* RTreeGetNode | ( | off_t | nodepos, |
int | level, | ||
struct RTree * | t | ||
) |
Definition at line 111 of file io.c.
References RTree_Node::level, NODE_BUFFER_SIZE, RTreeReadNode(), RTreeRewriteNode(), and t.
void RTreeInitRect | ( | struct RTree_Rect * | r, |
struct RTree * | t | ||
) |
Initialize a rectangle to have all 0 coordinates.
Definition at line 109 of file rect.c.
Referenced by RTreeSetRect1D(), RTreeSetRect2D(), RTreeSetRect3D(), and RTreeSetRect4D().
int RTreeInsertRectF | ( | struct RTree_Rect * | r, |
union RTree_Child | child, | ||
int | level, | ||
struct RTree * | t | ||
) |
Definition at line 213 of file indexf.c.
References b, MAXLEVEL, NULL, RTreeAllocNode(), and t.
Referenced by RTreeCreateTree().
int RTreeInsertRectM | ( | struct RTree_Rect * | r, |
union RTree_Child | child, | ||
int | level, | ||
struct RTree * | t | ||
) |
struct RTree_ListNode* RTreeNewListNode | ( | void | ) |
Definition at line 366 of file vector/rtree/index.c.
References malloc().
Referenced by RTreeReInsertNode().
void RTreeNodeChanged | ( | struct RTree_Node * | n, |
off_t | nodepos, | ||
struct RTree * | t | ||
) |
Definition at line 201 of file io.c.
References assert, RTree_Node::level, NODE_BUFFER_SIZE, and t.
void RTreeNodeCover | ( | struct RTree_Node * | n, |
struct RTree_Rect * | r, | ||
struct RTree * | t | ||
) |
Definition at line 135 of file node.c.
References RTree_Node::branch, RTree_Branch::child, RTree_Child::id, RTree_Node::level, r, RTree_Branch::rect, RTreeCopyRect, RTreeExpandRect(), and t.
void RTreeNullRect | ( | struct RTree_Rect * | r, |
struct RTree * | t | ||
) |
int RTreePickBranch | ( | struct RTree_Rect * | r, |
struct RTree_Node * | n, | ||
struct RTree * | t | ||
) |
void RTreePrintNode | ( | struct RTree_Node * | n, |
int | depth, | ||
struct RTree * | t | ||
) |
RectReal RTreeRectArea | ( | struct RTree_Rect * | , |
struct RTree * | |||
) |
RectReal RTreeRectMargin | ( | struct RTree_Rect * | r, |
struct RTree * | t | ||
) |
RectReal RTreeRectSphericalVolume | ( | struct RTree_Rect * | r, |
struct RTree * | t | ||
) |
RectReal RTreeRectVolume | ( | struct RTree_Rect * | R, |
struct RTree * | t | ||
) |
void RTreeReInsertNode | ( | struct RTree_Node * | n, |
struct RTree_ListNode ** | ee | ||
) |
Definition at line 380 of file vector/rtree/index.c.
References l, and RTreeNewListNode().
size_t RTreeRewriteNode | ( | struct RTree_Node * | n, |
off_t | nodepos, | ||
struct RTree * | t | ||
) |
Definition at line 193 of file io.c.
References RTreeWriteNode(), and t.
Referenced by RTreeFlushBuffer(), and RTreeGetNode().
int RTreeSearchF | ( | struct RTree * | t, |
struct RTree_Rect * | r, | ||
SearchHitCallback * | shcb, | ||
void * | cbarg | ||
) |
Definition at line 36 of file indexf.c.
Referenced by RTreeCreateTree().
int RTreeSearchM | ( | struct RTree * | t, |
struct RTree_Rect * | r, | ||
SearchHitCallback * | shcb, | ||
void * | cbarg | ||
) |
Definition at line 33 of file indexm.c.
Referenced by RTreeCreateTree().
void RTreeSplitNode | ( | struct RTree_Node * | n, |
struct RTree_Branch * | b, | ||
struct RTree_Node * | nn, | ||
struct RTree * | t | ||
) |
Definition at line 613 of file split.c.
References RTree_Node::level.
int RTreeValidChildF | ( | union RTree_Child * | child | ) |
Definition at line 26 of file indexf.c.
References RTree_Child::pos.
Referenced by RTreeCreateTree().
int RTreeValidChildM | ( | union RTree_Child * | child | ) |
Definition at line 23 of file indexm.c.
References NULL, and RTree_Child::ptr.
Referenced by RTreeCreateTree().