GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)-3d2c704037
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#include <grass/gis.h>
#include "index.h"
Go to the source code of this file.
Functions | |
void | RTreeAddNodePos (off_t pos, int level, struct RTree *t) |
off_t | RTreeGetNodePos (struct RTree *t) |
size_t | RTreeReadBranch (struct RTree_Branch *b, struct RTree *t) |
size_t | RTreeReadNode (struct RTree_Node *n, off_t nodepos, struct RTree *t) |
struct RTree_Node * | RTreeGetNode (off_t nodepos, int level, struct RTree *t) |
size_t | RTreeWriteBranch (struct RTree_Branch *b, struct RTree *t) |
size_t | RTreeWriteNode (struct RTree_Node *n, struct RTree *t) |
size_t | RTreeRewriteNode (struct RTree_Node *n, off_t nodepos, struct RTree *t) |
void | RTreeNodeChanged (struct RTree_Node *n, off_t nodepos, struct RTree *t) |
void | RTreeFlushBuffer (struct RTree *t) |
void RTreeAddNodePos | ( | off_t | pos, |
int | level, | ||
struct RTree * | t | ||
) |
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 RTreeFlushBuffer | ( | struct RTree * | t | ) |
Definition at line 230 of file io.c.
References NodeBuffer::dirty, NodeBuffer::n, RTree::nb, NODE_BUFFER_SIZE, NodeBuffer::pos, RTree::rootlevel, and RTreeRewriteNode().
struct RTree_Node* RTreeGetNode | ( | off_t | nodepos, |
int | level, | ||
struct RTree * | t | ||
) |
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.
off_t RTreeGetNodePos | ( | struct RTree * | t | ) |
Definition at line 72 of file io.c.
References RTree::_recycle::avail, RTree::fd, RTree::free_nodes, and RTree::_recycle::pos.
void RTreeNodeChanged | ( | struct RTree_Node * | n, |
off_t | nodepos, | ||
struct RTree * | t | ||
) |
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.
size_t RTreeReadBranch | ( | struct RTree_Branch * | b, |
struct RTree * | t | ||
) |
Definition at line 84 of file io.c.
References RTree_Rect::boundary, RTree_Branch::child, RTree::fd, RTree_Branch::rect, and RTree::rectsize.
Referenced by RTreeReadNode().
size_t RTreeReadNode | ( | struct RTree_Node * | n, |
off_t | nodepos, | ||
struct RTree * | t | ||
) |
Definition at line 95 of file io.c.
References RTree_Node::branch, RTree_Node::count, RTree::fd, RTree_Node::level, MAXCARD, and RTreeReadBranch().
Referenced by RTreeGetNode().
size_t RTreeRewriteNode | ( | struct RTree_Node * | n, |
off_t | nodepos, | ||
struct RTree * | t | ||
) |
Definition at line 190 of file io.c.
References RTree::fd, and RTreeWriteNode().
Referenced by RTreeFlushBuffer(), and RTreeGetNode().
size_t RTreeWriteBranch | ( | struct RTree_Branch * | b, |
struct RTree * | t | ||
) |
Definition at line 154 of file io.c.
References RTree_Rect::boundary, RTree_Branch::child, RTree::fd, G_fatal_error(), RTree_Branch::rect, and RTree::rectsize.
Referenced by RTreeWriteNode().
size_t RTreeWriteNode | ( | struct RTree_Node * | n, |
struct RTree * | t | ||
) |
Definition at line 169 of file io.c.
References RTree_Node::branch, RTree_Node::count, RTree::fd, G_fatal_error(), RTree_Node::level, MAXCARD, and RTreeWriteBranch().
Referenced by RTreeCreateTree(), and RTreeRewriteNode().