SAGA API  v9.5
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_BYTE(ix, iy, d)
 
#define BiCubicSpline(d, v)   (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]))))
 
#define SG_GRID_HISTOGRAM_CLASSES_DEFAULT   255
 
#define SORT_SWAP(a, b)   {itemp=(a);(a)=(b);(b)=itemp;}
 

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[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

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

Definition at line 592 of file grid.cpp.

◆ BILINEAR_ADD_BYTE

#define BILINEAR_ADD_BYTE (   ix,
  iy,
 
)
Value:
if( is_InGrid(ix, iy) ) {\
n += d; sLong 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);\
}

Definition at line 597 of file grid.cpp.

◆ SG_GRID_HISTOGRAM_CLASSES_DEFAULT

#define SG_GRID_HISTOGRAM_CLASSES_DEFAULT   255

Definition at line 1154 of file grid.cpp.

◆ SORT_SWAP

#define SORT_SWAP (   a,
 
)    {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 104 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::is_Valid().

◆ 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 96 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.0,
double  xMin = 0.0,
double  yMin = 0.0,
bool  bCached = false 
)

Safe grid construction

Definition at line 112 of file grid.cpp.

References CSG_Grid::is_Valid().

◆ SG_Create_Grid() [8/8]

CSG_Grid* SG_Create_Grid ( void  )
SG_GET_BYTE_1
#define SG_GET_BYTE_1(vLong)
Definition: api_core.h:195
SG_GET_BYTE_3
#define SG_GET_BYTE_3(vLong)
Definition: api_core.h:197
sLong
signed long long sLong
Definition: api_core.h:158
SG_GET_BYTE_0
#define SG_GET_BYTE_0(vLong)
Definition: api_core.h:194
SG_GET_BYTE_2
#define SG_GET_BYTE_2(vLong)
Definition: api_core.h:196