SAGA API v2.0.8
H:/saga/saga_svn/saga-gis/src/saga_core/saga_api/grid.h File Reference
#include "dataobject.h"
#include "table.h"
#include "grid_pyramid.h"

Go to the source code of this file.

Classes

class  CSG_Grid_System
class  CSG_Grid
struct  CSG_Grid::TSG_Grid_Line
class  CSG_Grid_Stack
class  CSG_Grid_Cell_Addressor

Defines

#define GRID_FILE_KEY_TRUE   SG_T("TRUE")
#define GRID_FILE_KEY_FALSE   SG_T("FALSE")

Typedefs

typedef enum ESG_Grid_Memory_Type TSG_Grid_Memory_Type
typedef enum ESG_Grid_File_Format TSG_Grid_File_Format
typedef enum ESG_Grid_File_Key TSG_Grid_File_Key
typedef enum ESG_Grid_Interpolation TSG_Grid_Interpolation
typedef enum ESG_Grid_Operation TSG_Grid_Operation

Enumerations

enum  ESG_Grid_Memory_Type { GRID_MEMORY_Normal = 0, GRID_MEMORY_Cache, GRID_MEMORY_Compression }
enum  ESG_Grid_File_Format { GRID_FILE_FORMAT_Undefined = 0, GRID_FILE_FORMAT_Binary, GRID_FILE_FORMAT_ASCII }
enum  ESG_Grid_File_Key {
  GRID_FILE_KEY_NAME = 0, GRID_FILE_KEY_DESCRIPTION, GRID_FILE_KEY_UNITNAME, GRID_FILE_KEY_DATAFILE_NAME,
  GRID_FILE_KEY_DATAFILE_OFFSET, GRID_FILE_KEY_DATAFORMAT, GRID_FILE_KEY_BYTEORDER_BIG, GRID_FILE_KEY_POSITION_XMIN,
  GRID_FILE_KEY_POSITION_YMIN, GRID_FILE_KEY_CELLCOUNT_X, GRID_FILE_KEY_CELLCOUNT_Y, GRID_FILE_KEY_CELLSIZE,
  GRID_FILE_KEY_Z_FACTOR, GRID_FILE_KEY_NODATA_VALUE, GRID_FILE_KEY_TOPTOBOTTOM, GRID_FILE_KEY_Count
}
enum  ESG_Grid_Interpolation {
  GRID_INTERPOLATION_NearestNeighbour = 0, GRID_INTERPOLATION_Bilinear, GRID_INTERPOLATION_InverseDistance, GRID_INTERPOLATION_BicubicSpline,
  GRID_INTERPOLATION_BSpline, GRID_INTERPOLATION_Mean_Nodes, GRID_INTERPOLATION_Mean_Cells, GRID_INTERPOLATION_Minimum,
  GRID_INTERPOLATION_Maximum, GRID_INTERPOLATION_Majority, GRID_INTERPOLATION_Undefined
}
enum  ESG_Grid_Operation { GRID_OPERATION_Addition = 0, GRID_OPERATION_Subtraction, GRID_OPERATION_Multiplication, GRID_OPERATION_Division }

Functions

SAGA_API_DLL_EXPORT CSG_GridSG_Create_Grid (void)
SAGA_API_DLL_EXPORT CSG_GridSG_Create_Grid (const CSG_Grid &Grid)
SAGA_API_DLL_EXPORT CSG_GridSG_Create_Grid (const CSG_String &File_Name, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
SAGA_API_DLL_EXPORT CSG_GridSG_Create_Grid (CSG_Grid *pGrid, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
SAGA_API_DLL_EXPORT CSG_GridSG_Create_Grid (const CSG_Grid_System &System, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
SAGA_API_DLL_EXPORT CSG_GridSG_Create_Grid (TSG_Data_Type Type, int NX, int NY, double Cellsize=0.0, double xMin=0.0, double yMin=0.0, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
SAGA_API_DLL_EXPORT const SG_Char * SG_Grid_Cache_Get_Directory (void)
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Directory (const SG_Char *Directory)
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Automatic (bool bOn)
SAGA_API_DLL_EXPORT bool SG_Grid_Cache_Get_Automatic (void)
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Confirm (int Confirm)
SAGA_API_DLL_EXPORT int SG_Grid_Cache_Get_Confirm (void)
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold (int nBytes)
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold_MB (double nMegabytes)
SAGA_API_DLL_EXPORT long SG_Grid_Cache_Get_Threshold (void)
SAGA_API_DLL_EXPORT double SG_Grid_Cache_Get_Threshold_MB (void)

Variables

const SG_Char gSG_Grid_File_Key_Names [GRID_FILE_KEY_Count][32]

Define Documentation

#define GRID_FILE_KEY_FALSE   SG_T("FALSE")

Definition at line 157 of file grid.h.

#define GRID_FILE_KEY_TRUE   SG_T("TRUE")

Definition at line 156 of file grid.h.


Typedef Documentation


Enumeration Type Documentation

Enumerator:
GRID_FILE_FORMAT_Undefined 
GRID_FILE_FORMAT_Binary 
GRID_FILE_FORMAT_ASCII 

Definition at line 105 of file grid.h.

Enumerator:
GRID_FILE_KEY_NAME 
GRID_FILE_KEY_DESCRIPTION 
GRID_FILE_KEY_UNITNAME 
GRID_FILE_KEY_DATAFILE_NAME 
GRID_FILE_KEY_DATAFILE_OFFSET 
GRID_FILE_KEY_DATAFORMAT 
GRID_FILE_KEY_BYTEORDER_BIG 
GRID_FILE_KEY_POSITION_XMIN 
GRID_FILE_KEY_POSITION_YMIN 
GRID_FILE_KEY_CELLCOUNT_X 
GRID_FILE_KEY_CELLCOUNT_Y 
GRID_FILE_KEY_CELLSIZE 
GRID_FILE_KEY_Z_FACTOR 
GRID_FILE_KEY_NODATA_VALUE 
GRID_FILE_KEY_TOPTOBOTTOM 
GRID_FILE_KEY_Count 

Definition at line 114 of file grid.h.

Enumerator:
GRID_INTERPOLATION_NearestNeighbour 
GRID_INTERPOLATION_Bilinear 
GRID_INTERPOLATION_InverseDistance 
GRID_INTERPOLATION_BicubicSpline 
GRID_INTERPOLATION_BSpline 
GRID_INTERPOLATION_Mean_Nodes 
GRID_INTERPOLATION_Mean_Cells 
GRID_INTERPOLATION_Minimum 
GRID_INTERPOLATION_Maximum 
GRID_INTERPOLATION_Majority 
GRID_INTERPOLATION_Undefined 

Definition at line 167 of file grid.h.

Enumerator:
GRID_MEMORY_Normal 
GRID_MEMORY_Cache 
GRID_MEMORY_Compression 

Definition at line 89 of file grid.h.

Enumerator:
GRID_OPERATION_Addition 
GRID_OPERATION_Subtraction 
GRID_OPERATION_Multiplication 
GRID_OPERATION_Division 

Definition at line 186 of file grid.h.


Function Documentation

SAGA_API_DLL_EXPORT CSG_Grid* SG_Create_Grid ( void  )

Safe grid construction

Definition at line 86 of file grid.cpp.

Referenced by CSG_Parameters_Grid_Target::Get_Grid(), and CSG_Parameters_Grid_Target::Get_User().

SAGA_API_DLL_EXPORT CSG_Grid* SG_Create_Grid ( const CSG_Grid Grid)

Safe grid construction

Definition at line 92 of file grid.cpp.

SAGA_API_DLL_EXPORT CSG_Grid* SG_Create_Grid ( CSG_Grid pGrid,
TSG_Data_Type  Type = SG_DATATYPE_Undefined,
TSG_Grid_Memory_Type  Memory_Type = GRID_MEMORY_Normal 
)

Safe grid construction

Definition at line 104 of file grid.cpp.

SAGA_API_DLL_EXPORT CSG_Grid* SG_Create_Grid ( const CSG_Grid_System System,
TSG_Data_Type  Type = SG_DATATYPE_Undefined,
TSG_Grid_Memory_Type  Memory_Type = GRID_MEMORY_Normal 
)

Safe grid construction

Definition at line 110 of file grid.cpp.

SAGA_API_DLL_EXPORT CSG_Grid* SG_Create_Grid ( const CSG_String File_Name,
TSG_Data_Type  Type = SG_DATATYPE_Undefined,
TSG_Grid_Memory_Type  Memory_Type = GRID_MEMORY_Normal 
)

Safe grid construction

Definition at line 98 of file grid.cpp.

SAGA_API_DLL_EXPORT 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,
TSG_Grid_Memory_Type  Memory_Type = GRID_MEMORY_Normal 
)

Safe grid construction

Definition at line 116 of file grid.cpp.

SAGA_API_DLL_EXPORT bool SG_Grid_Cache_Get_Automatic ( void  )

Definition at line 102 of file grid_memory.cpp.

References gSG_Grid_Cache_bAutomatic.

Referenced by SG_Grid_Cache_Check().

SAGA_API_DLL_EXPORT int SG_Grid_Cache_Get_Confirm ( void  )

Definition at line 115 of file grid_memory.cpp.

References gSG_Grid_Cache_Confirm.

Referenced by SG_Grid_Cache_Check().

SAGA_API_DLL_EXPORT const SG_Char* SG_Grid_Cache_Get_Directory ( void  )

Get default directory for grid caching

Definition at line 81 of file grid_memory.cpp.

SAGA_API_DLL_EXPORT long SG_Grid_Cache_Get_Threshold ( void  )

Definition at line 136 of file grid_memory.cpp.

References gSG_Grid_Cache_Threshold.

Referenced by SG_Grid_Cache_Check().

SAGA_API_DLL_EXPORT double SG_Grid_Cache_Get_Threshold_MB ( void  )

Definition at line 141 of file grid_memory.cpp.

References gSG_Grid_Cache_Threshold, and N_MEGABYTE_BYTES.

Referenced by SG_Grid_Cache_Check().

SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Automatic ( bool  bOn)

Definition at line 97 of file grid_memory.cpp.

References gSG_Grid_Cache_bAutomatic.

SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Confirm ( int  Confirm)

Definition at line 110 of file grid_memory.cpp.

References gSG_Grid_Cache_Confirm.

SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Directory ( const SG_Char *  Directory)

Set default directory for grid caching

Definition at line 86 of file grid_memory.cpp.

References SG_Dir_Exists().

SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold ( int  nBytes)

Definition at line 123 of file grid_memory.cpp.

References gSG_Grid_Cache_Threshold.

Referenced by SG_Grid_Cache_Set_Threshold_MB().

SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold_MB ( double  nMegabytes)

Definition at line 131 of file grid_memory.cpp.

References N_MEGABYTE_BYTES, and SG_Grid_Cache_Set_Threshold().


Variable Documentation

const SG_Char gSG_Grid_File_Key_Names[GRID_FILE_KEY_Count][32]
Initial value:
{
        SG_T("NAME"),
        SG_T("DESCRIPTION"),
        SG_T("UNIT"),
        SG_T("DATAFILE_NAME"),
        SG_T("DATAFILE_OFFSET"),
        SG_T("DATAFORMAT"),
        SG_T("BYTEORDER_BIG"),
        SG_T("POSITION_XMIN"),
        SG_T("POSITION_YMIN"),
        SG_T("CELLCOUNT_X"),
        SG_T("CELLCOUNT_Y"),
        SG_T("CELLSIZE"),
        SG_T("Z_FACTOR"),
        SG_T("NODATA_VALUE"),

}

Definition at line 136 of file grid.h.