GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71942
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
index.h File Reference
#include "rtree.h"
Include dependency graph for index.h:
This graph shows which files directly or indirectly include this file:

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)
 

Functions

struct RTree_ListNodeRTreeNewListNode (void)
 
void RTreeFreeListNode (struct RTree_ListNode *)
 
void RTreeReInsertNode (struct RTree_Node *, struct RTree_ListNode **)
 
void RTreeFreeListBranch (struct RTree_ListBranch *)
 
int RTreeSearchM (struct RTree *, struct RTree_Rect *, SearchHitCallback *, void *)
 
int RTreeInsertRectM (struct RTree_Rect *, union RTree_Child, int, struct RTree *)
 
int RTreeDeleteRectM (struct RTree_Rect *, union RTree_Child, struct RTree *)
 
int RTreeValidChildM (union RTree_Child *child)
 
int RTreeSearchF (struct RTree *, struct RTree_Rect *, SearchHitCallback *, void *)
 
int RTreeInsertRectF (struct RTree_Rect *, union RTree_Child, int, struct RTree *)
 
int RTreeDeleteRectF (struct RTree_Rect *, union RTree_Child, struct RTree *)
 
int RTreeValidChildF (union RTree_Child *)
 
void RTreeNodeCover (struct RTree_Node *, struct RTree_Rect *, struct RTree *)
 
int RTreeAddBranch (struct RTree_Branch *, struct RTree_Node *, struct RTree_Node **, struct RTree_ListBranch **, struct RTree_Rect *, char *, struct RTree *)
 
int RTreePickBranch (struct RTree_Rect *, struct RTree_Node *, struct RTree *)
 
void RTreeDisconnectBranch (struct RTree_Node *, int, struct RTree *)
 
void RTreePrintNode (struct RTree_Node *, int, struct RTree *)
 
void RTreeTabIn (int)
 
void RTreeCopyBranch (struct RTree_Branch *, struct RTree_Branch *, struct RTree *)
 
void RTreeInitRect (struct RTree_Rect *, struct RTree *)
 Initialize a rectangle to have all 0 coordinates. More...
 
void RTreeNullRect (struct RTree_Rect *, struct RTree *)
 
RectReal RTreeRectArea (struct RTree_Rect *, struct RTree *)
 
RectReal RTreeRectSphericalVolume (struct RTree_Rect *, struct RTree *)
 
RectReal RTreeRectVolume (struct RTree_Rect *, struct RTree *)
 
RectReal RTreeRectMargin (struct RTree_Rect *, struct RTree *)
 
void RTreeCombineRect (struct RTree_Rect *, struct RTree_Rect *, struct RTree_Rect *, struct RTree *)
 
int RTreeExpandRect (struct RTree_Rect *, struct RTree_Rect *, struct RTree *)
 
int RTreeCompareRect (struct RTree_Rect *, struct RTree_Rect *, struct RTree *)
 
void RTreeSplitNode (struct RTree_Node *, struct RTree_Branch *, struct RTree_Node *, struct RTree *)
 
int RTreeSetNodeMax (int, struct RTree *)
 
int RTreeSetLeafMax (int, struct RTree *)
 
int RTreeGetNodeMax (struct RTree *)
 
int RTreeGetLeafMax (struct RTree *)
 
struct RTree_NodeRTreeGetNode (off_t, int, struct RTree *)
 
void RTreeNodeChanged (struct RTree_Node *, off_t, struct RTree *)
 
size_t RTreeRewriteNode (struct RTree_Node *, off_t, struct RTree *)
 
void RTreeAddNodePos (off_t, int, struct RTree *)
 

Macro Definition Documentation

#define FORCECARD   3

Definition at line 29 of file index.h.

#define NODETYPE (   l,
  fd 
)    ((l) == 0 ? 0 : ((fd) < 0 ? 1 : 2))

Definition at line 31 of file index.h.

Referenced by RTreeAddBranch(), RTreeAllocNode(), and RTreeInsertRectF().

#define PGSIZE   512

Definition at line 26 of file index.h.

#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().

Function Documentation

void RTreeAddNodePos ( off_t  ,
int  ,
struct RTree  
)
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.

Referenced by RTreePickBranch().

int RTreeCompareRect ( struct RTree_Rect ,
struct RTree_Rect ,
struct RTree  
)

Definition at line 577 of file rect.c.

References RTree_Rect::boundary, RTree::ndims, and RTree::ndims_alloc.

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(), RTreeInsertRectF(), and RTreeInsertRectM().

void RTreeDisconnectBranch ( struct RTree_Node ,
int  ,
struct RTree  
)
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 )
void RTreeFreeListNode ( struct RTree_ListNode )

Definition at line 368 of file vector/rtree/index.c.

References free().

Referenced by RTreeDeleteRectF(), and RTreeDeleteRectM().

int RTreeGetLeafMax ( struct RTree )

Definition at line 42 of file card.c.

References RTree::leafcard.

struct RTree_Node* RTreeGetNode ( off_t  ,
int  ,
struct RTree  
)
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().

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  
)
void RTreeNullRect ( struct RTree_Rect ,
struct RTree  
)

Definition at line 227 of file rect.c.

References RTree_Rect::boundary, RTree::ndims_alloc, and RTree::nsides_alloc.

Referenced by RTreeInitPVars().

int RTreePickBranch ( struct RTree_Rect ,
struct RTree_Node ,
struct RTree  
)
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, and Undefined.

Referenced by RTreePickBranch().

RectReal RTreeRectVolume ( struct RTree_Rect ,
struct RTree  
)

Definition at line 325 of file rect.c.

References RTree_Rect::boundary, RTree::ndims, RTree::ndims_alloc, and Undefined.

void RTreeReInsertNode ( struct RTree_Node ,
struct RTree_ListNode **   
)
size_t RTreeRewriteNode ( struct RTree_Node ,
off_t  ,
struct RTree  
)

Definition at line 180 of file io.c.

References RTree::fd, and RTreeWriteNode().

Referenced by RTreeFlushBuffer(), and RTreeGetNode().

int RTreeSetLeafMax ( int  ,
struct RTree  
)

Definition at line 34 of file card.c.

References RTree::leafcard.

int RTreeSetNodeMax ( int  ,
struct RTree  
)

Definition at line 30 of file card.c.

References RTree::nodecard.

void RTreeSplitNode ( struct RTree_Node ,
struct RTree_Branch ,
struct RTree_Node ,
struct RTree  
)

Definition at line 600 of file split.c.

References RTree_Node::count, RTree_Node::level, MAXKIDS, METHOD, MINFILL, RTree::p, and RTree_PartitionVars::total.

Referenced by RTreeAddBranch().

void RTreeTabIn ( int  )

Definition at line 602 of file node.c.

Referenced by RTreePrintNode(), and RTreePrintRect().

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().