GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
#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) |
Definition at line 99 of file index.h.
Referenced by RTreeAddBranch(), RTreeCopyBranch(), and RTreeNodeCover().
int RTreeAddBranch | ( | struct RTree_Branch * | , |
struct RTree_Node * | , | ||
struct RTree_Node ** | , | ||
struct RTree_ListBranch ** | , | ||
struct RTree_Rect * | , | ||
char * | , | ||
struct RTree * | |||
) |
Definition at line 542 of file node.c.
References RTree_Node::branch, RTree_Branch::child, RTree_Node::count, RTree_Child::id, RTree_Node::level, MAXKIDS, RTree_Branch::rect, RTree::rootlevel, RTreeCopyRect, and RTree::valid_child.
void RTreeAddNodePos | ( | off_t | , |
int | , | ||
struct RTree * | |||
) |
Definition at line 32 of file io.c.
References RTree::_recycle::alloc, assert, RTree::_recycle::avail, NodeBuffer::dirty, RTree::free_nodes, RTree::nb, NODE_BUFFER_SIZE, NodeBuffer::pos, RTree::_recycle::pos, and RTree::used.
void RTreeCombineRect | ( | struct RTree_Rect * | , |
struct RTree_Rect * | , | ||
struct RTree_Rect * | , | ||
struct RTree * | |||
) |
Definition at line 505 of file rect.c.
References RTree_Rect::boundary, MAX, MIN, RTree::ndims, RTree::ndims_alloc, RTree::nsides_alloc, and Undefined.
int RTreeCompareRect | ( | struct RTree_Rect * | , |
struct RTree_Rect * | , | ||
struct RTree * | |||
) |
void RTreeCopyBranch | ( | struct RTree_Branch * | , |
struct RTree_Branch * | , | ||
struct RTree * | |||
) |
Definition at line 126 of file node.c.
References RTree_Branch::child, RTree_Branch::rect, and RTreeCopyRect.
Referenced by RTreeCopyNode().
int RTreeDeleteRectF | ( | struct RTree_Rect * | , |
union RTree_Child | , | ||
struct RTree * | |||
) |
int RTreeDeleteRectM | ( | struct RTree_Rect * | , |
union RTree_Child | , | ||
struct RTree * | |||
) |
void RTreeDisconnectBranch | ( | struct RTree_Node * | , |
int | , | ||
struct RTree * | |||
) |
Definition at line 270 of file node.c.
References assert, RTree_Node::branch, RTree_Branch::child, RTree::fd, and RTree::valid_child.
int RTreeExpandRect | ( | struct RTree_Rect * | , |
struct RTree_Rect * | , | ||
struct RTree * | |||
) |
Definition at line 542 of file rect.c.
References RTree_Rect::boundary, RTree::ndims, RTree::ndims_alloc, and Undefined.
Referenced by RTreeNodeCover().
void RTreeFreeListBranch | ( | struct RTree_ListBranch * | ) |
Definition at line 389 of file vector/rtree/index.c.
References RTree_ListBranch::b, free(), RTree_Branch::rect, and RTreeFreeBoundary().
void RTreeFreeListNode | ( | struct RTree_ListNode * | ) |
Definition at line 368 of file vector/rtree/index.c.
References free().
int RTreeGetLeafMax | ( | struct RTree * | ) |
Definition at line 42 of file card.c.
References RTree::leafcard.
struct RTree_Node* RTreeGetNode | ( | off_t | , |
int | , | ||
struct RTree * | |||
) |
Definition at line 112 of file io.c.
References NodeBuffer::dirty, RTree_Node::level, NodeBuffer::n, RTree::nb, NODE_BUFFER_SIZE, NodeBuffer::pos, RTreeReadNode(), RTreeRewriteNode(), and RTree::used.
int RTreeGetNodeMax | ( | struct RTree * | ) |
Definition at line 38 of file card.c.
References RTree::nodecard.
void RTreeInitRect | ( | struct RTree_Rect * | , |
struct RTree * | |||
) |
Initialize a rectangle to have all 0 coordinates.
Definition at line 112 of file rect.c.
References RTree_Rect::boundary, and RTree::ndims_alloc.
Referenced by RTreeSetRect1D(), RTreeSetRect2D(), RTreeSetRect3D(), and RTreeSetRect4D().
int RTreeInsertRectF | ( | struct RTree_Rect * | , |
union RTree_Child | , | ||
int | , | ||
struct RTree * | |||
) |
Definition at line 214 of file indexf.c.
References b, MAXLEVEL, NULL, RTree::overflow, and RTreeAllocNode().
Referenced by RTreeCreateTree().
int RTreeInsertRectM | ( | struct RTree_Rect * | , |
union RTree_Child | , | ||
int | , | ||
struct RTree * | |||
) |
Definition at line 186 of file indexm.c.
References b, MAXLEVEL, NULL, and RTree::overflow.
Referenced by RTreeCreateTree().
struct RTree_ListNode* RTreeNewListNode | ( | void | ) |
Definition at line 363 of file vector/rtree/index.c.
References malloc().
Referenced by RTreeReInsertNode().
void RTreeNodeChanged | ( | struct RTree_Node * | , |
off_t | , | ||
struct RTree * | |||
) |
Definition at line 198 of file io.c.
References assert, NodeBuffer::dirty, RTree_Node::level, RTree::nb, NODE_BUFFER_SIZE, NodeBuffer::pos, and RTree::used.
void RTreeNodeCover | ( | struct RTree_Node * | , |
struct RTree_Rect * | , | ||
struct RTree * | |||
) |
Definition at line 136 of file node.c.
References RTree_Node::branch, RTree_Branch::child, RTree_Child::id, RTree::leafcard, RTree_Node::level, RTree::nodecard, RTree_Branch::rect, RTreeCopyRect, RTreeExpandRect(), and RTree::valid_child.
void RTreeNullRect | ( | struct RTree_Rect * | , |
struct RTree * | |||
) |
Definition at line 227 of file rect.c.
References RTree_Rect::boundary, RTree::ndims_alloc, RTree::nsides_alloc, and r.
Referenced by RTreeInitPVars().
int RTreePickBranch | ( | struct RTree_Rect * | , |
struct RTree_Node * | , | ||
struct RTree * | |||
) |
void RTreePrintNode | ( | struct RTree_Node * | , |
int | , | ||
struct RTree * | |||
) |
Definition at line 617 of file node.c.
References RTree_Node::branch, RTree_Branch::child, RTree_Node::count, RTree_Child::id, RTree::leafcard, RTree_Node::level, RTree::nodecard, RTree_Branch::rect, RTreePrintRect(), and RTreeTabIn().
RectReal RTreeRectArea | ( | struct RTree_Rect * | , |
struct RTree * | |||
) |
RectReal RTreeRectMargin | ( | struct RTree_Rect * | , |
struct RTree * | |||
) |
Definition at line 487 of file rect.c.
References RTree_Rect::boundary, RTree::ndims, and RTree::ndims_alloc.
RectReal RTreeRectSphericalVolume | ( | struct RTree_Rect * | , |
struct RTree * | |||
) |
Definition at line 435 of file rect.c.
References RTree_Rect::boundary, RTree::ndims, RTree::ndims_alloc, Undefined, and UnitSphereVolumes.
RectReal RTreeRectVolume | ( | struct RTree_Rect * | , |
struct RTree * | |||
) |
Definition at line 325 of file rect.c.
References assert, RTree_Rect::boundary, M_PI, RTree::ndims, RTree::ndims_alloc, r, sphere_volume(), Undefined, and UnitSphereVolume.
void RTreeReInsertNode | ( | struct RTree_Node * | , |
struct RTree_ListNode ** | |||
) |
Definition at line 377 of file vector/rtree/index.c.
References l, RTree_ListNode::next, RTree_ListNode::node, and RTreeNewListNode().
size_t RTreeRewriteNode | ( | struct RTree_Node * | , |
off_t | , | ||
struct RTree * | |||
) |
Definition at line 190 of file io.c.
References RTree::fd, and RTreeWriteNode().
Referenced by RTreeFlushBuffer(), and RTreeGetNode().
int RTreeSearchF | ( | struct RTree * | , |
struct RTree_Rect * | , | ||
SearchHitCallback * | , | ||
void * | |||
) |
Definition at line 37 of file indexf.c.
Referenced by RTreeCreateTree().
int RTreeSearchM | ( | struct RTree * | , |
struct RTree_Rect * | , | ||
SearchHitCallback * | , | ||
void * | |||
) |
Definition at line 34 of file indexm.c.
Referenced by RTreeCreateTree().
void RTreeSplitNode | ( | struct RTree_Node * | , |
struct RTree_Branch * | , | ||
struct RTree_Node * | , | ||
struct RTree * | |||
) |
Definition at line 600 of file split.c.
References RTree_Node::level.
void RTreeTabIn | ( | int | ) |
Definition at line 602 of file node.c.
Referenced by RTreePrintNode().
int RTreeValidChildF | ( | union RTree_Child * | ) |
Definition at line 27 of file indexf.c.
References RTree_Child::pos.
Referenced by RTreeCreateTree().
int RTreeValidChildM | ( | union RTree_Child * | child | ) |
Definition at line 24 of file indexm.c.
References NULL, and RTree_Child::ptr.
Referenced by RTreeCreateTree().