rect.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include "assert.h"
#include "index.h"
#include <float.h>
#include <math.h>
#include <grass/gis.h>

Include dependency graph for rect.c:

Go to the source code of this file.

Defines

#define BIG_NUM   (FLT_MAX/4.0)
#define Undefined(x)   ((x)->boundary[0] > (x)->boundary[NUMDIMS])
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define UnitSphereVolume   UnitSphereVolumes[NUMDIMS]

Functions

void RTreeInitRect (struct Rect *R)
struct Rect RTreeNullRect (void)
void RTreePrintRect (struct Rect *R, int depth)
RectReal RTreeRectVolume (struct Rect *R)
RectReal RTreeRectSphericalVolume (struct Rect *R)
RectReal RTreeRectSurfaceArea (struct Rect *R)
struct Rect RTreeCombineRect (struct Rect *R, struct Rect *Rr)
int RTreeOverlap (struct Rect *R, struct Rect *S)
int RTreeContained (struct Rect *R, struct Rect *S)

Variables

const double UnitSphereVolumes []


Define Documentation

#define BIG_NUM   (FLT_MAX/4.0)

Definition at line 26 of file rect.c.

#define MAX ( a,
 )     ((a) > (b) ? (a) : (b))

Definition at line 31 of file rect.c.

Referenced by RTreeCombineRect().

#define MIN ( a,
 )     ((a) < (b) ? (a) : (b))

Definition at line 30 of file rect.c.

#define Undefined (  )     ((x)->boundary[0] > (x)->boundary[NUMDIMS])

#define UnitSphereVolume   UnitSphereVolumes[NUMDIMS]

Definition at line 216 of file rect.c.


Function Documentation

struct Rect RTreeCombineRect ( struct Rect R,
struct Rect Rr 
) [read]

Definition at line 302 of file rect.c.

References Rect::boundary, MAX, MIN, and Undefined.

Referenced by RTreeNodeCover(), and RTreePickBranch().

int RTreeContained ( struct Rect R,
struct Rect S 
)

Definition at line 350 of file rect.c.

References Rect::boundary, FALSE, TRUE, and Undefined.

void RTreeInitRect ( struct Rect R  ) 

Definition at line 37 of file rect.c.

References Rect::boundary, and NUMSIDES.

Referenced by RTreeNodeCover().

struct Rect RTreeNullRect ( void   )  [read]

Definition at line 50 of file rect.c.

References Rect::boundary, and NUMDIMS.

int RTreeOverlap ( struct Rect R,
struct Rect S 
)

Definition at line 328 of file rect.c.

References Rect::boundary, FALSE, and TRUE.

Referenced by RTreeSearch().

void RTreePrintRect ( struct Rect R,
int  depth 
)

Definition at line 131 of file rect.c.

References Rect::boundary, and RTreeTabIn().

RectReal RTreeRectSphericalVolume ( struct Rect R  ) 

Definition at line 251 of file rect.c.

References Rect::boundary, and Undefined.

Referenced by RTreePickBranch().

RectReal RTreeRectSurfaceArea ( struct Rect R  ) 

Definition at line 273 of file rect.c.

References Rect::boundary, and Undefined.

RectReal RTreeRectVolume ( struct Rect R  ) 

Definition at line 148 of file rect.c.

References Rect::boundary, and Undefined.


Variable Documentation

const double UnitSphereVolumes[]

Initial value:

 {
        0.000000,  
        2.000000,  
        3.141593,  
        4.188790,  
        4.934802,  
        5.263789,  
        5.167713,  
        4.724766,  
        4.058712,  
        3.298509,  
        2.550164,  
        1.884104,  
        1.335263,  
        0.910629,  
        0.599265,  
        0.381443,  
        0.235331,  
        0.140981,  
        0.082146,  
        0.046622,  
        0.025807,  
}

Definition at line 190 of file rect.c.


Generated on Sun Apr 6 17:32:52 2008 for GRASS by  doxygen 1.5.5