|
SAGA API
v9.6
|
Go to the documentation of this file.
75 if( !pGrids->
is_Valid() ) {
delete(pGrids); pGrids = NULL; }
return( pGrids );
83 if( !pGrids->
is_Valid() ) {
delete(pGrids); pGrids = NULL; }
return( pGrids );
93 if( !pGrids->
is_Valid() ) {
delete(pGrids); pGrids = NULL; }
return( pGrids );
101 if( !pGrids->
is_Valid() ) {
delete(pGrids); pGrids = NULL; }
return( pGrids );
107 CSG_Grids *pGrids =
new CSG_Grids(System, Attributes, zAttribute, Type, bCreateGrids);
109 if( bCreateGrids && !pGrids->
is_Valid() ) {
delete(pGrids); pGrids = NULL; }
return( pGrids );
117 if( !pGrids->
is_Valid() ) {
delete(pGrids); pGrids = NULL; }
return( pGrids );
172 Create(pGrids, bCopyData);
193 Create(NX, NY, NZ, Cellsize, xMin, yMin, zMin, Type);
205 Create(System, NZ, zMin, Type);
217 Create(System, Attributes, zAttribute, Type, bCreateGrids);
226 void CSG_Grids::_On_Construction(
void)
247 for(
size_t i=1; i<m_Grids.
Get_uSize(); i++)
260 m_Z_Attribute = m_Z_Name = 0;
283 m_Attributes.
Create(&pGrids->m_Attributes);
289 for(
int i=0; i<pGrids->
Get_NZ(); i++)
316 if( m_pGrids[0]->
Create(System, Type) )
339 if( m_Attributes.
Create(&Attributes) && m_pGrids[0]->
Create(System, Type) )
345 for(
int i=0; i<Attributes.
Get_Count(); i++)
411 void CSG_Grids::_Synchronize(
CSG_Grid *pGrid)
420 if( pGrid == m_pGrids[0] )
501 return( m_Z_Name >= 0 && m_Z_Name < m_Attributes.
Get_Field_Count() ? m_Z_Name : m_Z_Attribute );
509 return( m_Attributes.
Add_Field(Name, Type, Insert) );
517 if( m_Z_Attribute > i )
526 else if( m_Z_Name == i )
543 return( i >= 0 && i < (
int)m_Attributes.
Get_Count() && m_Attributes[i].
Set_Value(Field, Value) );
552 return( i >= 0 && i < (
int)m_Attributes.
Get_Count() && m_Attributes[i].
Set_Value(Field, Value) );
558 return( i >= 0 && i <
Get_NZ() && m_Attributes[i].
Set_Value(m_Z_Attribute, Value) );
564 bool bChanged =
false;
574 int Index = (int)Attributes[i].Get_Index();
580 m_pGrids[i] = pGrids[Index];
582 m_Attributes[i].
Assign(&Attributes[i]);
625 for(
int i=Count; i<
Get_NZ(); i++)
636 else if( Count >
Get_NZ() )
664 Attributes[0].
Set_Value(m_Z_Attribute, Z);
676 Attributes[0].
Set_Value(m_Z_Attribute, Z);
678 return(
Add_Grid(Attributes[0], pGrid, bAttach) );
694 _Synchronize(m_pGrids[0]);
753 else if( m_pGrids[0]->
Create(*pGrid) )
804 m_pGrids[i] = m_pGrids[i + 1];
829 for(
size_t i=0; i<m_Grids.
Get_uSize(); i++)
842 for(
size_t i=1; i<m_Grids.
Get_uSize(); i++)
923 m_pGrids[i]->
Assign(Value);
971 if( !m_pGrids[i]->
Assign(pGrids->m_pGrids[i], Interpolation) )
991 Create(Grids);
return( *
this );
996 Assign(Value);
return( *
this );
1002 return(
Add(Value) );
1009 m_pGrids[i]->
Add(Value);
1057 m_pGrids[i]->
Divide(Value);
1087 return(
Get_Value(p.
x, p.
y, p.
z, Value, Resampling, ZResampling) );
1100 if( !_Get_Z(z, iz, dz) )
1107 return( m_pGrids[iz]->
Get_Value(x, y, Value, Resampling) );
1112 ZResampling = Resampling;
1116 && (iz < 1 || iz >= m_Attributes.
Get_Count() - 2) )
1121 switch( ZResampling )
1124 return( m_pGrids[dz < 0.5 ? iz : iz + 1]->
Get_Value(x, y, Value, Resampling) );
1130 if( m_pGrids[iz ]->
Get_Value(x, y, v[0], Resampling)
1131 && m_pGrids[iz + 1]->
Get_Value(x, y, v[1], Resampling) )
1133 Value = v[0] + dz * (v[1] - v[0]);
1146 #define ADD_TO_SPLINE(i) if( i < 0 || i >= Get_NZ() || !m_pGrids[i]->Get_Value(x, y, Value, Resampling) ) return( false ); s.Add(Get_Z(i), Value);
1162 bool CSG_Grids::_Get_Z(
double z,
int &iz,
double &dz)
const
1164 if( z < m_Attributes[0 ].
asDouble(m_Z_Attribute)
1165 || z > m_Attributes[m_Attributes.
Get_Count() - 1].asDouble(m_Z_Attribute) )
1170 double z0, z1 = m_Attributes[0].asDouble(m_Z_Attribute);
1172 for(iz=0; iz<m_Attributes.
Get_Count()-1; iz++)
1174 z0 = z1; z1 = m_Attributes[iz + 1].asDouble(m_Z_Attribute);
1178 dz = z0 < z1 ? (z - z0) / (z1 - z0) : 0.;
1184 return( (dz = z - z1) == 0. );
1195 #define SORT_SWAP(a,b) {itemp=(a);(a)=(b);(b)=itemp;}
1197 bool CSG_Grids::_Set_Index(
void)
1210 sLong i, j, k, l, ir, n, *istack, jstack, nstack, indxt, itemp, nData;
1220 m_Index[--nData] = i;
1252 for(j=l+1; j<=ir; j++)
1257 for(i=j-1; i>=0; i--)
1264 m_Index[i + 1] = m_Index[i];
1267 m_Index[i + 1] = indxt;
1275 ir = istack[jstack--];
1276 l = istack[jstack--];
1302 do i++;
while(
asDouble(m_Index[i]) < a);
1303 do j--;
while(
asDouble(m_Index[j]) > a);
1313 m_Index[l] = m_Index[j];
1317 if( jstack >= nstack )
1323 if( ir - i + 1 >= j - l )
1325 istack[jstack] = ir;
1326 istack[jstack - 1] = i;
1331 istack[jstack] = j - 1;
1332 istack[jstack - 1] = l;
1370 for(
double i=0; i<(double)
Get_NCells(); i+=d)
1376 m_Statistics += Scaling ? Offset + Scaling * Value : Value;
1392 m_Statistics += Scaling ? Offset + Scaling * Value : Value;
1446 if( Quantile <= 0. ) {
return(
Get_Min() ); }
1447 if( Quantile >= 1. ) {
return(
Get_Max() ); }
1449 if( bFromHistogram )
1469 return(
Get_Quantile(0.01 * Percentile, bFromHistogram) );
1486 Update();
return( m_Statistics );
1503 if( xMin > xMax || yMin > yMax )
1508 Statistics.
Create(bHoldValues);
1510 int nx = 1 + (xMax - xMin);
1511 int ny = 1 + (yMax - yMin);
1512 sLong nCells = nx * ny;
1520 for(
double i=0; i<(double)nCells; i+=d)
1522 int y = yMin + (int)i / nx;
1523 int x = xMin + (int)i % nx;
1525 for(
int z=0; z<
Get_NZ(); z++)
1527 double Value =
asDouble(x, y, z,
false);
1531 Statistics += Scaling ? Offset + Scaling * Value : Value;
1538 for(
int x=xMin; x<=xMax; x++)
1540 for(
int y=yMin; y<=yMax; y++)
1542 for(
int z=0; z<
Get_NZ(); z++)
1544 double Value =
asDouble(x, y, z,
false);
1548 Statistics += Scaling ? Offset + Scaling * Value : Value;
1575 #define SG_GRID_HISTOGRAM_CLASSES_DEFAULT 255
1596 return( m_Histogram );
1614 if( xMin > xMax || yMin > yMax )
1621 int nx = 1 + (xMax - xMin);
1622 int ny = 1 + (yMax - yMin);
1623 sLong nCells = nx * ny;
1631 for(
double i=0; i<(double)nCells; i+=d)
1633 int y = yMin + (int)i / nx;
1634 int x = xMin + (int)i % nx;
1636 for(
int z=0; z<
Get_NZ(); z++)
1638 double Value =
asDouble(x, y, z,
false);
1642 Histogram += Scaling ? Offset + Scaling * Value : Value;
1649 for(
int x=xMin; x<=xMax; x++)
1651 for(
int y=yMin; y<=yMax; y++)
1653 for(
int z=0; z<
Get_NZ(); z++)
1655 double Value =
asDouble(x, y, z,
false);
1659 Histogram += Scaling ? Offset + Scaling * Value : Value;
1666 return( Histogram.
Update() );
1715 if( _Load_PGSQL (FileName)
1716 || _Load_Normal (FileName)
1717 || _Load_Compressed(FileName)
1718 || _Load_External (FileName) )
1750 bool bResult =
false;
1755 bResult = _Save_Normal (FileName);
1759 bResult = _Save_Compressed(FileName);
1795 bool CSG_Grids::_Load_External(
const CSG_String &FileName)
1811 m_Attributes.
Create(&pGrids->m_Attributes);
1838 bool CSG_Grids::_Load_PGSQL(
const CSG_String &FileName)
1840 bool bResult =
false;
1846 s = s.AfterFirst(
':');
CSG_String Host (s.BeforeFirst(
':'));
1847 s = s.AfterFirst(
':');
CSG_String Port (s.BeforeFirst(
':'));
1848 s = s.AfterFirst(
':');
CSG_String DBName(s.BeforeFirst(
':'));
1849 s = s.AfterFirst(
':');
CSG_String Table (s.BeforeFirst(
':'));
1850 s = s.AfterFirst(
':');
CSG_String rid (s.BeforeFirst(
':').AfterFirst(
'='));
1855 while( rids.Has_More_Tokens() )
1857 if( !rid.is_Empty() )
1862 rid +=
"rid=\'" + rids.Get_Next_Token() +
"\'";
1880 for(
int i=0; !bResult && i<Connections.
Get_Count(); i++)
1882 if( !Connection.
Cmp(Connections[i].asString(0)) )
1938 bool CSG_Grids::_Load_Normal(
const CSG_String &_FileName)
1950 if( !Stream.
Open(FileName,
SG_FILE_R,
false) || !_Load_Header(Stream) )
1958 if( !Stream.
Open(FileName,
SG_FILE_R,
false) || !_Load_Attributes(Stream) )
1968 if( !Stream.
Open(FileName,
SG_FILE_R,
true) || !_Load_Data(Stream, m_pGrids[i]) )
1985 bool CSG_Grids::_Save_Normal(
const CSG_String &_FileName)
1994 if( !Stream.
Open(FileName,
SG_FILE_W,
false) || !_Save_Header(Stream) )
2001 if( !Stream.
Open(FileName,
SG_FILE_W,
false) || !_Save_Attributes(Stream) )
2011 if( !Stream.
Open(FileName,
SG_FILE_W,
true) || !_Save_Data(Stream, m_pGrids[i]) )
2031 bool CSG_Grids::_Load_Compressed(
const CSG_String &_FileName)
2043 if( !Stream.Get_File(FileName +
"sg-gds") || !_Load_Header(Stream) )
2049 if( !Stream.Get_File(FileName +
"sg-att") || !_Load_Attributes(Stream) )
2057 if( !Stream.Get_File(FileName +
CSG_String::Format(
"sg-%03d", i + 1)) || !_Load_Data(Stream, m_pGrids[i]) )
2066 if( Stream.Get_File(FileName +
"sg-info") )
2071 if( Stream.Get_File(FileName +
"sg-prj") )
2080 bool CSG_Grids::_Save_Compressed(
const CSG_String &_FileName)
2087 if( !Stream.Add_File(FileName +
"sg-gds") || !_Save_Header(Stream) )
2092 if( !Stream.Add_File(FileName +
"sg-att") || !_Save_Attributes(Stream) )
2100 if( !Stream.Add_File(FileName +
CSG_String::Format(
"sg-%03d", i + 1)) || !_Save_Data(Stream, m_pGrids[i]) )
2107 if( Stream.Add_File(FileName +
"sg-info") )
2112 if( Stream.Add_File(FileName +
"sg-prj") )
2126 bool CSG_Grids::_Load_Header(
CSG_File &Stream)
2130 if( !Header.
Load(Stream) )
2136 if( !Header(
"NX") || !Header(
"NY") || !Header(
"XMIN") || !Header(
"YMIN") || !Header(
"CELLSIZE") || !Header(
"TYPE") )
2142 Header[
"XMIN"].Get_Content().
asDouble(), Header[
"YMIN"].Get_Content().
asDouble(),
2143 Header[
"NX" ].Get_Content().
asInt (), Header[
"NY" ].Get_Content().
asInt ()
2154 if( Header(
"NAME" ) )
Set_Name (Header[
"NAME" ].Get_Content());
2155 if( Header(
"DESCRIPTION") )
Set_Description(Header[
"DESCRIPTION"].Get_Content());
2156 if( Header(
"UNIT" ) )
Set_Unit (Header[
"UNIT" ].Get_Content());
2159 Header(
"SCALE" ) ? Header[
"SCALE" ].Get_Content().
asDouble() : 1.,
2160 Header(
"OFFSET") ? Header[
"OFFSET"].Get_Content().
asDouble() : 0.
2163 if( Header(
"NODATA_MIN") )
2165 if( Header(
"NODATA_MAX") )
2168 Header[
"NODATA_MIN"].Get_Content().
asDouble(),
2169 Header[
"NODATA_MAX"].Get_Content().
asDouble()
2175 Header[
"NODATA_MIN"].Get_Content().
asDouble()
2183 if( Header(
"ATTRIBUTES") && Header[
"ATTRIBUTES"](
"FIELDS") == NULL )
2189 if( Fields[iField].Cmp_Name(
"FIELD") && Fields[iField].Get_Property(
"TYPE") )
2208 if( Header(
"ATTRIBUTES") && Header[
"ATTRIBUTES"](
"FIELDS") != NULL )
2210 if( !Header[
"ATTRIBUTES"].Get_Property(
"ZATTRIBUTE", m_Z_Attribute) )
2217 const CSG_MetaData &Fields = Header[
"ATTRIBUTES"][
"FIELDS"];
2221 if( Fields[iField].Cmp_Name(
"FIELD") && Fields[iField].Get_Property(
"TYPE") )
2227 if( m_Attributes.
Get_Field_Count() > 0 && Header[
"ATTRIBUTES"](
"RECORDS") )
2231 const CSG_MetaData &Records = Header[
"ATTRIBUTES"][
"RECORDS"];
2235 if( Records[iRecord].Cmp_Name(
"RECORD") )
2239 if( Values.Get_Tokens_Count() == (
size_t)Attributes.Get_Field_Count() )
2245 pRecord->
Set_Value(iField, Values.Get_Next_Token());
2257 else if( Header(
"NZ") && Header[
"NZ"].Get_Content().
asInt() > 0 )
2261 for(
int i=0, n=Header[
"NZ"].Get_Content().
asInt(); i<n; i++)
2276 bool CSG_Grids::_Save_Header(
CSG_File &Stream)
2324 return( Header.
Save(Stream) );
2333 bool CSG_Grids::_Load_Attributes(
CSG_File &Stream)
2343 if( Values.Get_Tokens_Count() == (
size_t)Attributes.Get_Field_Count() )
2349 pRecord->
Set_Value(iField, Values.Get_Next_Token());
2363 bool CSG_Grids::_Save_Attributes(
CSG_File &Stream)
2365 for(
int iRecord=0; iRecord<m_Attributes.
Get_Count(); iRecord++)
2369 Stream.
Write(m_Attributes[iRecord].asString(iField));
2394 for(
int y=0; y<
Get_NY(); y++)
2401 char *pValue = (
char *)Line.Get_Array();
2430 for(
int y=0; y<
Get_NY(); y++)
2432 char *pValue = (
char *)Line.Get_Array();
2466 bool CSG_Grids::_Assign_MeanValue (
CSG_Grids *pSource,
bool bVolumeProportional ) {
return(
false ); }
2467 bool CSG_Grids::_Assign_ExtremeValue (
CSG_Grids *pSource,
bool bMaximum ) {
return(
false ); }
2468 bool CSG_Grids::_Assign_Majority (
CSG_Grids *pSource ) {
return(
false ); }
void Set_Unit(const CSG_String &Unit)
TSG_Data_Type Get_Type(void) const
CSG_String BeforeFirst(char Character) const
virtual CSG_Grids & Subtract(double Value)
@ GRIDS_FILE_FORMAT_Normal
virtual bool Open(const CSG_String &FileName, int Mode=SG_FILE_R, bool bBinary=true, int Encoding=SG_FILE_ENCODING_ANSI)
virtual CSG_Grids & Multiply(double Value)
virtual bool Assign(CSG_Data_Object *pTable)
sLong Get_Max_Samples(void) const
#define SG_FREE_SAFE(PTR)
bool Set_Z(int i, double Value)
@ GRID_RESAMPLING_NearestNeighbour
bool Save(const CSG_String &File, ESG_CRS_Format Format=ESG_CRS_Format::WKT) const
virtual int asInt(int x, int y, int z, bool bScaled=true) const
sLong Get_Data_Count(void)
int Printf(const char *Format,...)
double Get_Cellsize(void) const
virtual bool Set_Count(sLong nRecords)
virtual bool Del_Records(void)
sLong Get_Sorted(sLong Position, bool bDown=true, bool bCheckNoData=true)
double Get_Offset(void) const
void Set_File_Name(const CSG_String &FileName)
virtual void Set_Value(sLong i, double Value, bool bScaled=true)
const SG_Char * Get_Description(void) const
bool Update(bool bForce=false)
virtual CSG_Grids & operator=(const CSG_Grids &Grids)
@ GRID_RESAMPLING_BicubicSpline
bool Set_Z_Attribute(int Field)
bool Set_Attribute(int i, int Field, const CSG_String &Value)
virtual bool Assign(double Value=0.)
double Get_Scaling(void) const
double Get_Variance(void)
double Get_NoData_Value(bool bUpper=false) const
double Get_XMax(void) const
const CSG_Table & Get_Attributes(void) const
@ SG_UI_MSG_STYLE_SUCCESS
SAGA_API_DLL_EXPORT CSG_String SG_Get_String(double Value, int Precision=-99)
virtual bool Del_Field(int iField)
bool Create(const CSG_Grid &Grid)
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Extension(const CSG_String &FileName, const CSG_String &Extension)
SAGA_API_DLL_EXPORT void * SG_Malloc(size_t size)
CSG_String Get_Grid_Name(int i, int Style=0) const
virtual bool On_Update(void)
int Get_Grid_Count(void) const
virtual bool Save(const CSG_String &File, int Format=0)
bool Save_MetaData(const CSG_String &FileName)
int Get_yWorld_to_Grid(double yWorld) const
bool Add_Attribute(const char *Name, TSG_Data_Type Type, int Insert=-1)
bool is_NoData_Value(double Value) const
@ GRID_RESAMPLING_Undefined
virtual const CSG_Rect & Get_Extent(void)
virtual bool Destroy(void)
virtual bool On_Delete(void)
const SG_Char * Get_Name(void) const
bool Create(const CSG_Histogram &Histogram)
sLong Get_NCells(void) const
@ SG_DATAOBJECT_TYPE_Grids
virtual bool is_Valid(void) const
TSG_Data_Type Get_Type(void) const
int Get_Z_Attribute(void) const
int Get_Field_Count(void) const
bool is_Scaled(void) const
SAGA_API_DLL_EXPORT bool SG_File_Delete(const CSG_String &FileName)
SAGA_API_DLL_EXPORT void SG_Free(void *memblock)
virtual TSG_Data_Object_Type Get_ObjectType(void) const =0
Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking.
virtual bool Set_Max_Samples(sLong Max_Samples)
double Get_Percentile(double Percentile, bool bFromHistogram=true)
virtual CSG_Grids & operator/=(double Value)
bool Del_Attribute(int Field)
virtual CSG_Grids & operator+=(double Value)
void ** Create(const CSG_Array_Pointer &Array)
size_t Read(void *Buffer, size_t Size, size_t Count=1) const
#define SG_GRIDS_NAME_INDEX
virtual bool On_Reload(void)
void Set_Update_Flag(bool bOn=true)
const CSG_Grid_System & Get_System(void) const
int Cmp(const CSG_String &String) const
CSG_Data_Object * Get_Owner(void) const
virtual bool Set_Max_Samples(sLong Max_Samples)
@ GRIDS_FILE_FORMAT_Undefined
CSG_String SG_Data_Type_Get_Identifier(TSG_Data_Type Type)
virtual bool Destroy(void)
bool is_Compatible(CSG_Grid *pGrid) const
@ SG_UI_MSG_STYLE_FAILURE
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Name(const CSG_String &full_Path, bool bExtension)
const SG_Char * Get_Unit(void) const
double Get_Scaling(void) const
virtual CSG_Grid & Multiply(const CSG_Grid &Grid)
virtual bool Create(const CSG_Grids &Grids)
virtual CSG_Grid & Add(const CSG_Grid &Grid)
#define SG_GRIDS_NAME_VALUE
const SG_Char * Get_Field_Name(int iField) const
@ GRID_RESAMPLING_Bilinear
double Get_YMin(void) const
const CSG_Grid_System & Get_System(void) const
virtual CSG_Grid & Subtract(const CSG_Grid &Grid)
sLong Get_Count(void) const
virtual bool is_Valid(void) const
int Get_nLineBytes(void) const
double Get_YMin(bool bCells=false) const
size_t Get_uSize(void) const
double Get_Value(double x, double y, double z, TSG_Grid_Resampling Resampling=GRID_RESAMPLING_BSpline, TSG_Grid_Resampling ZResampling=GRID_RESAMPLING_Undefined) const
bool Read_Line(CSG_String &sLine) const
int SG_UI_Msg_Lock(bool bOn)
virtual void Set_Value(sLong i, double Value, bool bScaled=true)
void Set_Scaling(double Scale=1.0, double Offset=0.0)
virtual bool is_NoData(int x, int y, int z) const
virtual CSG_Grids & operator-=(double Value)
bool Update_Z_Order(void)
CSG_Grid * Get_Grid_Ptr(int i) const
@ GRIDS_FILE_FORMAT_Compressed
sLong Get_Count(void) const
const CSG_Histogram & Get_Histogram(size_t nClasses=0)
void Set_Scaling(double Scale=1., double Offset=0.)
double Get_Offset(void) const
void SG_UI_Process_Set_Text(const CSG_String &Text)
virtual bool Assign(double Value=0.0)
const SG_Char * Get_File_Name(bool bNative=true) const
virtual bool Destroy(void)
@ GRID_RESAMPLING_BSpline
virtual short asShort(int x, int y, bool bScaled=true) const
virtual bool Set_Value(sLong Index, int iField, const SG_Char *Value)
#define SG_GRIDS_NAME_GRID
bool Set_Grid_Count(int Count)
bool Set_Z_Name_Field(int Field)
bool Load(const CSG_String &File)
@ SG_DATAOBJECT_TYPE_Grid
void Set_Name(const CSG_String &Name)
size_t Get_Class_Count(void) const
bool Set_Count(sLong Count)
CSG_Grids * SG_Create_Grids(void)
static CSG_String Format(const char *Format,...)
double Get_ZMax(bool bCells=false) const
double Get_XMin(bool bCells=false) const
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
SAGA_API_DLL_EXPORT bool SG_File_Set_Extension(CSG_String &FileName, const CSG_String &Extension)
virtual bool Load(const CSG_String &File, bool bLoadData=true)
virtual double asDouble(sLong i, bool bScaled=true) const
virtual bool Del_Record(sLong Index)
bool Get_Value(double x, double &y)
double Get_Z(int i) const
virtual CSG_Grids & Add(double Value)
virtual double asDouble(sLong i, bool bScaled=true) const
void Set_Description(const CSG_String &Description)
CSG_MetaData & Get_MetaData_DB(void) const
virtual float asFloat(int x, int y, bool bScaled=true) const
bool is_Empty(void) const
#define SG_GRIDS_NAME_OWNER
bool SG_UI_Process_Set_Progress(int Position, int Range)
bool Set_Value(int Field, const CSG_String &Value)
bool Create(bool bHoldValues=false)
int Get_xWorld_to_Grid(double xWorld) const
double Get_YMax(void) const
bool Load_MetaData(const CSG_String &FileName)
double Get_XMin(void) const
void Set_Owner(CSG_Data_Object *pOwner)
int Get_Z_Name_Field(void) const
virtual CSG_Grid & Divide(const CSG_Grid &Grid)
double Get_Variance(void)
double Get_Cellsize(void) const
void ** Get_Array(void) const
virtual bool Set_NoData_Value(double Value)
CSG_Data_Collection & Grids(void) const
virtual void Set_Modified(bool bModified=true)
virtual BYTE asByte(int x, int y, bool bScaled=true) const
SAGA_API_DLL_EXPORT CSG_String SG_File_Make_Path(const CSG_String &Directory, const CSG_String &Name)
virtual bool Set_NoData_Value_Range(double loValue, double hiValue)
void SG_UI_ProgressAndMsg_Lock(bool bOn)
const SG_Char * c_str(void) const
size_t Write(void *Buffer, size_t Size, size_t Count=1) const
virtual char asChar(int x, int y, bool bScaled=true) const
sLong Get_NoData_Count(void)
bool SG_UI_Process_Set_Ready(void)
CSG_Grid * SG_Create_Grid(void)
TSG_Data_Type SG_Data_Type_Get_Type(const CSG_String &Identifier)
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
bool Set_Index(CSG_Index &Index, int Field, bool bAscending=true) const
void SG_UI_Msg_Add_Error(const char *Message)
#define SG_GRID_HISTOGRAM_CLASSES_DEFAULT
void Set_Unit(const CSG_String &Unit)
TSG_Data_Type Get_Field_Type(int iField) const
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
bool Del_Grid(int i, bool bDetach=false)
bool Create(const CSG_Projection &Projection)
int Get_Field(const CSG_String &Name) const
int Get_nValueBytes(void) const
double Get_Quantile(double Quantile, bool bFromHistogram=true)
virtual bool Set_NoData_Value_Range(double Lower, double Upper)
CSG_Projection & Get_Projection(void)
const CSG_Simple_Statistics & Get_Statistics(void)
virtual bool Destroy(void)
virtual int asInt(int x, int y, bool bScaled=true) const
virtual CSG_Grids & operator*=(double Value)
virtual CSG_Grids & Divide(double Value)
const CSG_Simple_Statistics & Get_Statistics(void) const
bool Del_Grids(bool bDetach=false)
void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
@ GRIDS_FILE_FORMAT_GeoTIFF