GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
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 
)

Definition at line 31 of file io.c.

References assert, NODE_BUFFER_SIZE, and t.

◆ RTreeFlushBuffer()

void RTreeFlushBuffer ( struct RTree t)

Definition at line 233 of file io.c.

References NODE_BUFFER_SIZE, RTreeRewriteNode(), and t.

◆ RTreeGetNode()

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.

◆ RTreeGetNodePos()

off_t RTreeGetNodePos ( struct RTree t)

Definition at line 71 of file io.c.

References t.

◆ RTreeNodeChanged()

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.

◆ RTreeReadBranch()

size_t RTreeReadBranch ( struct RTree_Branch b,
struct RTree t 
)

Definition at line 83 of file io.c.

References b, and t.

Referenced by RTreeReadNode().

◆ RTreeReadNode()

size_t RTreeReadNode ( struct RTree_Node n,
off_t  nodepos,
struct RTree t 
)

Definition at line 94 of file io.c.

References RTree_Node::branch, RTree_Node::count, RTree_Node::level, MAXCARD, RTreeReadBranch(), and t.

Referenced by RTreeGetNode().

◆ RTreeRewriteNode()

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

◆ RTreeWriteBranch()

size_t RTreeWriteBranch ( struct RTree_Branch b,
struct RTree t 
)

Definition at line 152 of file io.c.

References b, G_fatal_error(), and t.

Referenced by RTreeWriteNode().

◆ RTreeWriteNode()

size_t RTreeWriteNode ( struct RTree_Node n,
struct RTree t 
)