SAGA API v9.10
Loading...
Searching...
No Matches
grid.cpp File Reference
#include "grid.h"
#include "data_manager.h"

Go to the source code of this file.

Macros

#define BILINEAR_ADD(ix, iy, d)
#define BILINEAR_ADD(ix, iy, d)
#define BiCubicSpline(d, v)
#define SET_BYTE(b, z)
#define SG_GRID_HISTOGRAM_CLASSES_DEFAULT   256
#define SORT_SWAP(a, b)

Functions

CSG_GridSG_Create_Grid (void)
CSG_GridSG_Create_Grid (const CSG_Grid &Grid)
CSG_GridSG_Create_Grid (const char *File, TSG_Data_Type Type, bool bCached, bool bLoadData)
CSG_GridSG_Create_Grid (const wchar_t *File, TSG_Data_Type Type, bool bCached, bool bLoadData)
CSG_GridSG_Create_Grid (const CSG_String &File, TSG_Data_Type Type, bool bCached, bool bLoadData)
CSG_GridSG_Create_Grid (CSG_Grid *pGrid, TSG_Data_Type Type, bool bCached)
CSG_GridSG_Create_Grid (const CSG_Grid_System &System, TSG_Data_Type Type, bool bCached)
CSG_GridSG_Create_Grid (TSG_Data_Type Type, int NX, int NY, double Cellsize, double xMin, double yMin, bool bCached)

Macro Definition Documentation

◆ BiCubicSpline

#define BiCubicSpline ( d,
v )
Value:
(v[1] + 0.5 * d * (v[2] - v[0] + d * (2 * v[0] - 5 * v[1] + 4 * v[2] - v[3] + d * (3 * (v[1] - v[2]) + v[3] - v[0]))))

◆ BILINEAR_ADD [1/2]

#define BILINEAR_ADD ( ix,
iy,
d )
Value:
if( is_InGrid(ix, iy) ) { n += d; z += d * asDouble(ix, iy); }

◆ BILINEAR_ADD [2/2]

#define BILINEAR_ADD ( ix,
iy,
d )
Value:
if( is_InGrid(ix, iy) ) { n += d; int v = asInt(ix, iy);\
z[0] += d * SG_GET_BYTE_0(v);\
z[1] += d * SG_GET_BYTE_1(v);\
z[2] += d * SG_GET_BYTE_2(v);\
z[3] += d * SG_GET_BYTE_3(v);\
}
#define SG_GET_BYTE_1(vLong)
Definition api_core.h:195
#define SG_GET_BYTE_3(vLong)
Definition api_core.h:197
#define SG_GET_BYTE_2(vLong)
Definition api_core.h:196
#define SG_GET_BYTE_0(vLong)
Definition api_core.h:194

◆ SET_BYTE

#define SET_BYTE ( b,
z )
Value:
{ double d = z; b = (BYTE)(d < 0. ? 0. : d < 255. ? d : 255.); }

◆ SG_GRID_HISTOGRAM_CLASSES_DEFAULT

#define SG_GRID_HISTOGRAM_CLASSES_DEFAULT   256

◆ SORT_SWAP

#define SORT_SWAP ( a,
b )
Value:
{itemp=(a);(a)=(b);(b)=itemp;}

Function Documentation

◆ SG_Create_Grid() [1/8]

CSG_Grid * SG_Create_Grid ( const char * File,
TSG_Data_Type Type = SG_DATATYPE_Undefined,
bool bCached = false,
bool bLoadData = true )

Safe grid construction

Definition at line 86 of file grid.cpp.

References SG_Create_Grid().

◆ SG_Create_Grid() [2/8]

CSG_Grid * SG_Create_Grid ( const CSG_Grid & Grid)

Safe grid construction

Definition at line 78 of file grid.cpp.

References CSG_Grid::is_Valid().

◆ SG_Create_Grid() [3/8]

CSG_Grid * SG_Create_Grid ( const CSG_Grid_System & System,
TSG_Data_Type Type = SG_DATATYPE_Undefined,
bool bCached = false )

Safe grid construction

Definition at line 109 of file grid.cpp.

References CSG_Grid::is_Valid().

◆ SG_Create_Grid() [4/8]

CSG_Grid * SG_Create_Grid ( const CSG_String & File,
TSG_Data_Type Type = SG_DATATYPE_Undefined,
bool bCached = false,
bool bLoadData = true )

Safe grid construction

Definition at line 88 of file grid.cpp.

References CSG_Grid::Create().

◆ SG_Create_Grid() [5/8]

CSG_Grid * SG_Create_Grid ( const wchar_t * File,
TSG_Data_Type Type = SG_DATATYPE_Undefined,
bool bCached = false,
bool bLoadData = true )

Safe grid construction

Definition at line 87 of file grid.cpp.

References SG_Create_Grid().

◆ SG_Create_Grid() [6/8]

CSG_Grid * SG_Create_Grid ( CSG_Grid * pGrid,
TSG_Data_Type Type = SG_DATATYPE_Undefined,
bool bCached = false )

Safe grid construction

Definition at line 101 of file grid.cpp.

References CSG_Grid::is_Valid().

◆ SG_Create_Grid() [7/8]

CSG_Grid * SG_Create_Grid ( TSG_Data_Type Type,
int NX,
int NY,
double Cellsize = 0.,
double xMin = 0.,
double yMin = 0.,
bool bCached = false )

Safe grid construction

Definition at line 117 of file grid.cpp.

References CSG_Grid::is_Valid().

◆ SG_Create_Grid() [8/8]