GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d37ee165c
io.c File Reference
#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"
Include dependency graph for io.c:

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

Function Documentation

◆ RTreeAddNodePos()

void RTreeAddNodePos ( off_t  pos,
int  level,
struct RTree t 
)

◆ RTreeFlushBuffer()

void RTreeFlushBuffer ( struct RTree t)

◆ RTreeGetNode()

struct RTree_Node* RTreeGetNode ( off_t  nodepos,
int  level,
struct RTree t 
)

◆ RTreeGetNodePos()

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.

◆ RTreeNodeChanged()

void RTreeNodeChanged ( struct RTree_Node n,
off_t  nodepos,
struct RTree t 
)

◆ RTreeReadBranch()

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

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

◆ RTreeRewriteNode()

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

◆ RTreeWriteBranch()

size_t RTreeWriteBranch ( struct RTree_Branch b,
struct RTree t 
)

◆ RTreeWriteNode()

size_t RTreeWriteNode ( struct RTree_Node n,
struct RTree t 
)