Logo Search packages:      
Sourcecode: saga version File versions  Download package

CSG_Grid Class Reference

#include <grid.h>

Inheritance diagram for CSG_Grid:

CSG_Data_Object

List of all members.


Detailed Description

CSG_Grid is the data object created for raster handling.

Definition at line 376 of file grid.h.


Public Member Functions

virtual CSG_GridAdd (double Value)
virtual CSG_GridAdd (const CSG_Grid &Grid)
virtual void Add_Value (long n, double Value)
virtual void Add_Value (int x, int y, double Value)
virtual BYTE asByte (long n, bool bZFactor=false) const
virtual BYTE asByte (int x, int y, bool bZFactor=false) const
virtual char asChar (long n, bool bZFactor=false) const
virtual char asChar (int x, int y, bool bZFactor=false) const
virtual double asDouble (int x, int y, bool bZFactor=false) const
virtual double asDouble (long n, bool bZFactor=false) const
virtual float asFloat (long n, bool bZFactor=false) const
virtual float asFloat (int x, int y, bool bZFactor=false) const
class CSG_GridasGrid (void)
virtual int asInt (long n, bool bZFactor=false) const
virtual int asInt (int x, int y, bool bZFactor=false) const
class CSG_PointCloud * asPointCloud (void)
class CSG_Shapes * asShapes (void)
virtual short asShort (long n, bool bZFactor=false) const
virtual short asShort (int x, int y, bool bZFactor=false) const
virtual bool Assign (CSG_Grid *pGrid, TSG_Grid_Interpolation Interpolation)
virtual bool Assign (CSG_Data_Object *pObject)
virtual bool Assign (double Value=0.0)
void Assign_NoData (void)
class CSG_Table * asTable (void)
class CSG_TIN * asTIN (void)
bool Create (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)
bool Create (const CSG_Grid_System &System, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
bool Create (CSG_Grid *pGrid, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
bool Create (const CSG_String &File_Name, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
bool Create (const CSG_Grid &Grid)
 CSG_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)
 CSG_Grid (const CSG_Grid_System &System, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
 CSG_Grid (CSG_Grid *pGrid, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
 CSG_Grid (const CSG_String &File_Name, TSG_Data_Type Type=SG_DATATYPE_Undefined, TSG_Grid_Memory_Type Memory_Type=GRID_MEMORY_Normal)
 CSG_Grid (const CSG_Grid &Grid)
 CSG_Grid (void)
void DeNormalise (double ArithMean, double Variance)
virtual bool Destroy (void)
virtual CSG_GridDivide (double Value)
virtual CSG_GridDivide (const CSG_Grid &Grid)
void Flip (void)
double Get_ArithMean (bool bZFactor=false)
int Get_Buffer_Size (void)
double Get_Cellarea (void) const
double Get_Cellsize (void) const
double Get_Compression_Ratio (void)
const SG_Char * Get_Description (void) const
const CSG_Rect & Get_Extent (void) const
const SG_Char * Get_File_Name (bool bNullAsString=false) const
int Get_File_Type (void) const
bool Get_Gradient (int x, int y, double &Decline, double &Azimuth) const
int Get_Gradient_NeighborDir (int x, int y, bool bMustBeLower=true) const
CSG_MetaData & Get_History (void)
CSG_MetaData & Get_MetaData (void) const
CSG_MetaData & Get_MetaData_DB (void)
const SG_Char * Get_Name (void) const
long Get_NCells (void) const
double Get_NoData_hiValue (void) const
double Get_NoData_Value (void) const
int Get_nValueBytes (void) const
int Get_NX (void) const
int Get_NY (void) const
virtual TSG_Data_Object_Type Get_ObjectType (void) const
double Get_Percentile (double Percent, bool bZFactor=false)
CSG_Projection & Get_Projection (void)
bool Get_Sorted (long Position, int &x, int &y, bool bDown=true, bool bCheckNoData=true)
bool Get_Sorted (long Position, long &n, bool bDown=true, bool bCheckNoData=true)
long Get_Sorted (long Position, bool bDown=true, bool bCheckNoData=true)
double Get_StdDev (bool bZFactor=false)
const CSG_Grid_SystemGet_System (void) const
TSG_Data_Type Get_Type (void) const
const SG_Char * Get_Unit (void) const
bool Get_Value (TSG_Point Position, double &Value, int Interpolation=GRID_INTERPOLATION_BSpline, bool bZFactor=false, bool bByteWise=false, bool bOnlyValidCells=false) const
bool Get_Value (double xPos, double yPos, double &Value, int Interpolation=GRID_INTERPOLATION_BSpline, bool bZFactor=false, bool bByteWise=false, bool bOnlyValidCells=false) const
double Get_Value (TSG_Point Position, int Interpolation=GRID_INTERPOLATION_BSpline, bool bZFactor=false, bool bByteWise=false, bool bOnlyValidCells=false) const
double Get_Value (double xPos, double yPos, int Interpolation=GRID_INTERPOLATION_BSpline, bool bZFactor=false, bool bByteWise=false, bool bOnlyValidCells=false) const
double Get_Variance (void)
double Get_XMax (void) const
double Get_XMin (void) const
double Get_XRange (void) const
double Get_YMax (void) const
double Get_YMin (void) const
double Get_YRange (void) const
double Get_ZFactor (void) const
double Get_ZMax (bool bZFactor=false)
double Get_ZMin (bool bZFactor=false)
double Get_ZRange (bool bZFactor=false)
void Invert (void)
bool is_Cached (void)
bool is_Compatible (int NX, int NY, double Cellsize, double xMin, double yMin) const
bool is_Compatible (const CSG_Grid_System &System) const
bool is_Compatible (CSG_Grid *pGrid) const
bool is_Compressed (void)
bool is_InGrid (int x, int y, bool bCheckNoData=true) const
bool is_InGrid_byPos (TSG_Point Position) const
bool is_InGrid_byPos (double xPos, double yPos) const
TSG_Intersection is_Intersecting (double xMin, double yMin, double xMax, double yMax) const
TSG_Intersection is_Intersecting (const TSG_Rect &Extent) const
TSG_Intersection is_Intersecting (const CSG_Rect &Extent) const
bool is_Modified (void) const
virtual bool is_NoData (long n) const
virtual bool is_NoData (int x, int y) const
virtual bool is_NoData_Value (double Value) const
virtual bool is_Valid (void) const
void Mirror (void)
virtual void Mul_Value (long n, double Value)
virtual void Mul_Value (int x, int y, double Value)
virtual CSG_GridMultiply (double Value)
virtual CSG_GridMultiply (const CSG_Grid &Grid)
void Normalise (void)
virtual double operator() (int x, int y) const
virtual CSG_Grid operator* (double Value) const
virtual CSG_Grid operator* (const CSG_Grid &Grid) const
virtual CSG_Gridoperator*= (double Value)
virtual CSG_Gridoperator*= (const CSG_Grid &Grid)
virtual CSG_Grid operator+ (double Value) const
virtual CSG_Grid operator+ (const CSG_Grid &Grid) const
virtual CSG_Gridoperator+= (double Value)
virtual CSG_Gridoperator+= (const CSG_Grid &Grid)
virtual CSG_Grid operator- (double Value) const
virtual CSG_Grid operator- (const CSG_Grid &Grid) const
virtual CSG_Gridoperator-= (double Value)
virtual CSG_Gridoperator-= (const CSG_Grid &Grid)
virtual CSG_Grid operator/ (double Value) const
virtual CSG_Grid operator/ (const CSG_Grid &Grid) const
virtual CSG_Gridoperator/= (double Value)
virtual CSG_Gridoperator/= (const CSG_Grid &Grid)
virtual CSG_Gridoperator= (double Value)
virtual CSG_Gridoperator= (const CSG_Grid &Grid)
virtual bool Save (const CSG_String &File_Name, int Format, int xA, int yA, int xN, int yN)
virtual bool Save (const CSG_String &File_Name, int Format=GRID_FILE_FORMAT_Binary)
bool Set_Buffer_Size (int Size)
bool Set_Cache (bool bOn)
bool Set_Compression (bool bOn)
void Set_Description (const SG_Char *String)
bool Set_Index (bool bOn=false)
virtual void Set_Modified (bool bFlag=true)
void Set_Name (const SG_Char *Name)
virtual void Set_NoData (long n)
virtual void Set_NoData (int x, int y)
void Set_NoData_Value (double Value)
void Set_NoData_Value_Range (double loValue, double hiValue)
void Set_Unit (const SG_Char *String)
virtual void Set_Value (int x, int y, double Value)
virtual void Set_Value (long n, double Value)
virtual void Set_Value_And_Sort (int x, int y, double Value)
virtual void Set_Value_And_Sort (long n, double Value)
void Set_ZFactor (double Value)
virtual CSG_GridSubtract (double Value)
virtual CSG_GridSubtract (const CSG_Grid &Grid)
bool Update (void)
virtual ~CSG_Grid (void)

Protected Member Functions

bool Get_Update_Flag (void)
bool Load_MetaData (const SG_Char *File_Name)
virtual bool On_Update (void)
bool Save_MetaData (const SG_Char *File_Name)
void Set_File_Name (const SG_Char *File_Name)
void Set_File_Type (int File_Type)
void Set_Update_Flag (bool bOn=true)

Private Member Functions

bool _Array_Create (void)
void _Array_Destroy (void)
bool _Assign_ExtremeValue (CSG_Grid *pSource, bool bMaximum)
bool _Assign_Interpolated (CSG_Grid *pSource, TSG_Grid_Interpolation Interpolation)
bool _Assign_MeanValue (CSG_Grid *pSource, bool bAreaProportional)
bool _Cache_Create (void)
bool _Cache_Create (const SG_Char *FilePath, TSG_Data_Type File_Type, long Offset, bool bSwap, bool bFlip)
bool _Cache_Destroy (bool bMemory_Restore)
void _Cache_LineBuffer_Load (TSG_Grid_Line *pLine, int y) const
void _Cache_LineBuffer_Save (TSG_Grid_Line *pLine) const
bool _Compr_Create (void)
bool _Compr_Destroy (bool bMemory_Restore)
void _Compr_LineBuffer_Load (TSG_Grid_Line *pLine, int y) const
void _Compr_LineBuffer_Save (TSG_Grid_Line *pLine) const
int _Get_nLineBytes (void)
double _Get_ValAtPos_BiCubicSpline (double dx, double dy, double z_xy[4][4]) const
double _Get_ValAtPos_BiCubicSpline (int x, int y, double dx, double dy, bool bByteWise) const
double _Get_ValAtPos_BiLinear (int x, int y, double dx, double dy, bool bByteWise) const
double _Get_ValAtPos_BSpline (double dx, double dy, double z_xy[4][4]) const
double _Get_ValAtPos_BSpline (int x, int y, double dx, double dy, bool bByteWise) const
bool _Get_ValAtPos_Fill4x4Submatrix (int x, int y, double z_xy[4][4][4]) const
bool _Get_ValAtPos_Fill4x4Submatrix (int x, int y, double z_xy[4][4]) const
double _Get_ValAtPos_InverseDistance (int x, int y, double dx, double dy, bool bByteWise) const
double _Get_ValAtPos_NearestNeighbour (int x, int y, double dx, double dy) const
void _LineBuffer_Create (void)
void _LineBuffer_Destroy (void)
void _LineBuffer_Flush (void)
TSG_Grid_Line * _LineBuffer_Get_Line (int y) const
int _LineBuffer_Get_nBytes (void) const
double _LineBuffer_Get_Value (int x, int y) const
void _LineBuffer_Set_Value (int x, int y, double Value)
bool _Load (const CSG_String &File_Name, TSG_Data_Type m_Type, TSG_Grid_Memory_Type aMemory_Type)
bool _Load_ASCII (CSG_File &Stream, TSG_Grid_Memory_Type aMemory_Type, bool bFlip=false)
bool _Load_Binary (CSG_File &Stream, TSG_Data_Type File_Type, bool bFlip, bool bSwapBytes)
bool _Load_Native (const CSG_String &File_Name, TSG_Grid_Memory_Type aMemory_Type)
int _Load_Native_Get_Key (CSG_File &Stream, CSG_String &Line)
bool _Load_Surfer (const CSG_String &File_Name, TSG_Grid_Memory_Type aMemory_Type)
bool _Memory_Create (TSG_Grid_Memory_Type aMemory_Type)
void _Memory_Destroy (void)
void _On_Construction (void)
CSG_Grid_Operation_Arithmetic (double Value, TSG_Grid_Operation Operation)
CSG_Grid_Operation_Arithmetic (const CSG_Grid &Grid, TSG_Grid_Operation Operation)
bool _Save_ASCII (CSG_File &Stream, int xA, int yA, int xN, int yN, bool bFlip=false)
bool _Save_Binary (CSG_File &Stream, int xA, int yA, int xN, int yN, TSG_Data_Type File_Type, bool bFlip, bool bSwapBytes)
bool _Save_Native (const CSG_String &File_Name, int xA, int yA, int xN, int yN, bool bBinary=true)
bool _Set_Index (void)
void _Set_Properties (TSG_Data_Type m_Type, int NX, int NY, double Cellsize, double xMin, double yMin)
void _Swap_Bytes (char *Bytes, int nBytes) const

Private Attributes

bool Cache_bFlip
bool Cache_bSwap
bool Cache_bTemp
long Cache_Offset
CSG_String Cache_Path
CSG_File Cache_Stream
TSG_Grid_Line * LineBuffer
int LineBuffer_Count
bool m_bCreated
bool m_bIndexed
CSG_String m_Description
long * m_Index
bool m_Memory_bLock
TSG_Grid_Memory_Type m_Memory_Type
double m_NoData_hiValue
double m_NoData_Value
CSG_Grid_System m_System
TSG_Data_Type m_Type
CSG_String m_Unit
void ** m_Values
double m_zFactor
CSG_Simple_Statistics m_zStats

Static Private Attributes

static BYTE m_Bitmask [8] = { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 }

Classes

struct  TSG_Grid_Line

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index