 |
SAGA API
v9.9
|
Go to the documentation of this file.
77 delete(pGrids); pGrids = NULL;
90 delete(pGrids); pGrids = NULL;
103 if( !pGrids->
Create(File, bLoadData) )
105 delete(pGrids); pGrids = NULL;
118 delete(pGrids); pGrids = NULL;
127 CSG_Grids *pGrids =
new CSG_Grids(System, Attributes, zAttribute, Type, bCreateGrids);
129 if( bCreateGrids && !pGrids->
is_Valid() )
131 delete(pGrids); pGrids = NULL;
144 delete(pGrids); pGrids = NULL;
153 return(
new CSG_Grids(Attributes, zAttribute) );
208 Create(pGrids, bCopyData);
229 Create(System, NZ, zMin, Type);
241 Create(System, Attributes, zAttribute, Type, bCreateGrids);
253 Create(NX, NY, NZ, Cellsize, xMin, yMin, zMin, Type);
265 Create(Attributes, zAttribute);
274 void CSG_Grids::_On_Construction(
void)
295 for(
size_t i=1; i<m_Grids.
Get_uSize(); i++)
308 m_Z_Attribute = m_Z_Name = 0;
331 m_Attributes.
Create(&pGrids->m_Attributes);
337 for(
int i=0; i<pGrids->
Get_NZ(); i++)
364 if( m_pGrids[0]->
Create(System, Type) )
387 if( m_Attributes.
Create(&Attributes) && m_pGrids[0]->
Create(System, Type) )
393 for(
int i=0; i<Attributes.
Get_Count(); i++)
419 if( m_Attributes.
Create(&Attributes) )
474 void CSG_Grids::_Synchronize(
CSG_Grid *pGrid)
483 if( pGrid == m_pGrids[0] )
569 return( m_Z_Name >= 0 && m_Z_Name < m_Attributes.
Get_Field_Count() ? m_Z_Name : m_Z_Attribute );
577 return( m_Attributes.
Add_Field(Name, Type, Insert) );
585 if( m_Z_Attribute > i )
594 else if( m_Z_Name == i )
611 return( i >= 0 && i < (
int)m_Attributes.
Get_Count() && m_Attributes[i].
Set_Value(Field, Value) );
620 return( i >= 0 && i < (
int)m_Attributes.
Get_Count() && m_Attributes[i].
Set_Value(Field, Value) );
626 return( i >= 0 && i <
Get_NZ() && m_Attributes[i].
Set_Value(m_Z_Attribute, Value) );
632 bool bChanged =
false;
642 int Index = (int)Attributes[i].Get_Index();
648 m_pGrids[i] = pGrids[Index];
650 m_Attributes[i].
Assign(&Attributes[i]);
693 for(
int i=Count; i<
Get_NZ(); i++)
704 else if( Count >
Get_NZ() )
732 Attributes[0].
Set_Value(m_Z_Attribute, Z);
744 Attributes[0].
Set_Value(m_Z_Attribute, Z);
746 return(
Add_Grid(Attributes[0], pGrid, bAttach) );
762 _Synchronize(m_pGrids[0]);
821 else if( m_pGrids[0]->
Create(*pGrid) )
872 m_pGrids[i] = m_pGrids[i + 1];
897 for(
size_t i=0; i<m_Grids.
Get_uSize(); i++)
910 for(
size_t i=1; i<m_Grids.
Get_uSize(); i++)
991 m_pGrids[i]->
Assign(Value);
1007 if( !m_pGrids[i]->
Assign(pObject->
asGrid(), bProgress) )
1031 bool bResult =
true;
1035 if( !m_pGrids[i]->
Assign(pGrids->m_pGrids[i], Interpolation, bProgress) )
1055 Create(Grids);
return( *
this );
1060 Assign(Value);
return( *
this );
1066 return(
Add(Value) );
1073 m_pGrids[i]->
Add(Value);
1121 m_pGrids[i]->
Divide(Value);
1147 return(
Get_Value(p.
x, p.
y, p.
z, Value, Resampling, ZResampling) );
1160 if( !_Get_Z(z, iz, dz) )
1167 return( m_pGrids[iz]->
Get_Value(x, y, Value, Resampling) );
1172 ZResampling = Resampling;
1175 if( (ZResampling == CSG_Grid_Resampling::Bicubic_1 || ZResampling == CSG_Grid_Resampling::Bicubic_2)
1176 && (iz < 1 || iz >= m_Attributes.
Get_Count() - 2) )
1178 ZResampling = CSG_Grid_Resampling::Bilinear;
1181 switch( ZResampling )
1183 case CSG_Grid_Resampling::NearestNeighbour:
default:
1184 return( m_pGrids[dz < 0.5 ? iz : iz + 1]->
Get_Value(x, y, Value, Resampling) );
1186 case CSG_Grid_Resampling::Bilinear:
1190 if( m_pGrids[iz ]->
Get_Value(x, y, v[0], Resampling)
1191 && m_pGrids[iz + 1]->
Get_Value(x, y, v[1], Resampling) )
1193 Value = v[0] + dz * (v[1] - v[0]);
1201 case CSG_Grid_Resampling::Bicubic_1:
1202 case CSG_Grid_Resampling::Bicubic_2:
1206 #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);
1222 bool CSG_Grids::_Get_Z(
double z,
int &iz,
double &dz)
const
1224 if( z < m_Attributes[0 ].
asDouble(m_Z_Attribute)
1225 || z > m_Attributes[m_Attributes.
Get_Count() - 1].asDouble(m_Z_Attribute) )
1230 double z0, z1 = m_Attributes[0].asDouble(m_Z_Attribute);
1232 for(iz=0; iz<m_Attributes.
Get_Count()-1; iz++)
1234 z0 = z1; z1 = m_Attributes[((
sLong)iz) + 1].asDouble(m_Z_Attribute);
1238 dz = z0 < z1 ? (z - z0) / (z1 - z0) : 0.;
1244 return( (dz = z - z1) == 0. );
1255 #define SORT_SWAP(a,b) {itemp=(a);(a)=(b);(b)=itemp;}
1257 bool CSG_Grids::_Set_Index(
void)
1270 sLong i, j, k, l, ir, n, *istack, jstack, nstack, indxt, itemp, nData;
1280 m_Index[--nData] = i;
1312 for(j=l+1; j<=ir; j++)
1317 for(i=j-1; i>=0; i--)
1324 m_Index[i + 1] = m_Index[i];
1327 m_Index[i + 1] = indxt;
1335 ir = istack[jstack--];
1336 l = istack[jstack--];
1362 do i++;
while(
asDouble(m_Index[i]) < a);
1363 do j--;
while(
asDouble(m_Index[j]) > a);
1373 m_Index[l] = m_Index[j];
1377 if( jstack >= nstack )
1383 if( ir - i + 1 >= j - l )
1385 istack[jstack] = ir;
1386 istack[jstack - 1] = i;
1391 istack[jstack] = j - 1;
1392 istack[jstack - 1] = l;
1430 for(
double i=0; i<(double)
Get_NCells(); i+=d)
1436 m_Statistics += Scaling ? Offset + Scaling * Value : Value;
1452 m_Statistics += Scaling ? Offset + Scaling * Value : Value;
1506 if( Quantile <= 0. ) {
return(
Get_Min() ); }
1507 if( Quantile >= 1. ) {
return(
Get_Max() ); }
1509 if( bFromHistogram )
1529 return(
Get_Quantile(0.01 * Percentile, bFromHistogram) );
1546 Update();
return( m_Statistics );
1563 if( xMin > xMax || yMin > yMax )
1568 Statistics.
Create(bHoldValues);
1570 int nx = 1 + (xMax - xMin);
1571 int ny = 1 + (yMax - yMin);
1580 for(
double i=0; i<(double)nCells; i+=d)
1582 int y = yMin + (int)i / nx;
1583 int x = xMin + (int)i % nx;
1585 for(
int z=0; z<
Get_NZ(); z++)
1587 double Value =
asDouble(x, y, z,
false);
1591 Statistics += Scaling ? Offset + Scaling * Value : Value;
1598 for(
int x=xMin; x<=xMax; x++)
1600 for(
int y=yMin; y<=yMax; y++)
1602 for(
int z=0; z<
Get_NZ(); z++)
1604 double Value =
asDouble(x, y, z,
false);
1608 Statistics += Scaling ? Offset + Scaling * Value : Value;
1637 #define SG_GRID_HISTOGRAM_CLASSES_DEFAULT 255
1658 return( m_Histogram );
1676 if( xMin > xMax || yMin > yMax )
1683 int nx = 1 + (xMax - xMin);
1684 int ny = 1 + (yMax - yMin);
1693 for(
double i=0; i<(double)nCells; i+=d)
1695 int y = yMin + (int)i / nx;
1696 int x = xMin + (int)i % nx;
1698 for(
int z=0; z<
Get_NZ(); z++)
1700 double Value =
asDouble(x, y, z,
false);
1704 Histogram += Scaling ? Offset + Scaling * Value : Value;
1711 for(
int x=xMin; x<=xMax; x++)
for(
int y=yMin; y<=yMax; y++)
for(
int z=0; z<
Get_NZ(); z++)
1713 double Value =
asDouble(x, y, z,
false);
1717 Histogram += Scaling ? Offset + Scaling * Value : Value;
1722 return( Histogram.
Update() );
1771 if( _Load_PGSQL (File)
1772 || _Load_Normal (File)
1773 || _Load_Compressed(File)
1774 || _Load_External (File) )
1811 bool bResult =
false;
1816 bResult = _Save_Normal (File);
1820 bResult = _Save_Compressed(File);
1856 bool CSG_Grids::_Load_External(
const CSG_String &File)
1872 m_Attributes.
Create(&pGrids->m_Attributes);
1899 bool CSG_Grids::_Load_PGSQL(
const CSG_String &File)
1901 bool bResult =
false;
1907 s = s.AfterFirst(
':');
CSG_String Host (s.BeforeFirst(
':'));
1908 s = s.AfterFirst(
':');
CSG_String Port (s.BeforeFirst(
':'));
1909 s = s.AfterFirst(
':');
CSG_String DBase(s.BeforeFirst(
':'));
1910 s = s.AfterFirst(
':');
CSG_String Table(s.BeforeFirst(
':'));
1911 s = s.AfterFirst(
':');
CSG_String rid (s.BeforeFirst(
':').AfterFirst(
'='));
1916 for(
int i=0; i<rids.Get_Count(); i++)
1918 if( !rid.is_Empty() )
1923 rid +=
"rid=\'" + rids[i] +
"\'";
1976 bool CSG_Grids::_Load_Normal(
const CSG_String &_File)
1986 if( !Stream.
Open(File,
SG_FILE_R,
false) || !_Load_Header(Stream) )
1994 if( !Stream.
Open(File,
SG_FILE_R,
false) || !_Load_Attributes(Stream) )
2004 if( !Stream.
Open(File,
SG_FILE_R,
true) || !_Load_Data(Stream, m_pGrids[i]) )
2021 bool CSG_Grids::_Save_Normal(
const CSG_String &_File)
2028 if( !Stream.
Open(File,
SG_FILE_W,
false) || !_Save_Header(Stream) )
2035 if( !Stream.
Open(File,
SG_FILE_W,
false) || !_Save_Attributes(Stream) )
2045 if( !Stream.
Open(File,
SG_FILE_W,
true) || !_Save_Data(Stream, m_pGrids[i]) )
2065 bool CSG_Grids::_Load_Compressed(
const CSG_String &_File)
2077 if( !Stream.Get_File(File +
"sg-gds") || !_Load_Header(Stream) )
2083 if( !Stream.Get_File(File +
"sg-att") || !_Load_Attributes(Stream) )
2091 if( !Stream.Get_File(File +
CSG_String::Format(
"sg-%03d", i + 1)) || !_Load_Data(Stream, m_pGrids[i]) )
2100 if( Stream.Get_File(File +
"sg-info") )
2105 if( Stream.Get_File(File +
"sg-prj") )
2114 bool CSG_Grids::_Save_Compressed(
const CSG_String &_File)
2121 if( !Stream.Add_File(File +
"sg-gds") || !_Save_Header(Stream) )
2126 if( !Stream.Add_File(File +
"sg-att") || !_Save_Attributes(Stream) )
2134 if( !Stream.Add_File(File +
CSG_String::Format(
"sg-%03d", i + 1)) || !_Save_Data(Stream, m_pGrids[i]) )
2141 if( Stream.Add_File(File +
"sg-info") )
2146 if( Stream.Add_File(File +
"sg-prj") )
2160 bool CSG_Grids::_Load_Header(
CSG_File &Stream)
2164 if( !Header.
Load(Stream) )
2170 if( !Header(
"NX") || !Header(
"NY") || !Header(
"XMIN") || !Header(
"YMIN") || !Header(
"CELLSIZE") || !Header(
"TYPE") )
2176 Header[
"XMIN"].Get_Content().
asDouble(), Header[
"YMIN"].Get_Content().
asDouble(),
2177 Header[
"NX" ].Get_Content().
asInt (), Header[
"NY" ].Get_Content().
asInt ()
2188 if( Header(
"NAME" ) )
Set_Name (Header[
"NAME" ].Get_Content());
2189 if( Header(
"DESCRIPTION") )
Set_Description(Header[
"DESCRIPTION"].Get_Content());
2190 if( Header(
"UNIT" ) )
Set_Unit (Header[
"UNIT" ].Get_Content());
2193 Header(
"SCALE" ) ? Header[
"SCALE" ].Get_Content().
asDouble() : 1.,
2194 Header(
"OFFSET") ? Header[
"OFFSET"].Get_Content().
asDouble() : 0.
2197 if( Header(
"NODATA_MIN") )
2199 if( Header(
"NODATA_MAX") )
2202 Header[
"NODATA_MIN"].Get_Content().
asDouble(),
2203 Header[
"NODATA_MAX"].Get_Content().
asDouble()
2209 Header[
"NODATA_MIN"].Get_Content().
asDouble()
2217 if( Header(
"ATTRIBUTES") && Header[
"ATTRIBUTES"](
"FIELDS") == NULL )
2223 if( Fields[iField].Cmp_Name(
"FIELD") && Fields[iField].Get_Property(
"TYPE") )
2242 if( Header(
"ATTRIBUTES") && Header[
"ATTRIBUTES"](
"FIELDS") != NULL )
2244 if( !Header[
"ATTRIBUTES"].Get_Property(
"ZATTRIBUTE", m_Z_Attribute) )
2251 const CSG_MetaData &Fields = Header[
"ATTRIBUTES"][
"FIELDS"];
2255 if( Fields[iField].Cmp_Name(
"FIELD") && Fields[iField].Get_Property(
"TYPE") )
2261 if( m_Attributes.
Get_Field_Count() > 0 && Header[
"ATTRIBUTES"](
"RECORDS") )
2265 const CSG_MetaData &Records = Header[
"ATTRIBUTES"][
"RECORDS"];
2269 if( Records[iRecord].Cmp_Name(
"RECORD") )
2273 if( Values.Get_Tokens_Count() == (
size_t)Attributes.Get_Field_Count() )
2279 pRecord->
Set_Value(iField, Values.Get_Next_Token());
2291 else if( Header(
"NZ") && Header[
"NZ"].Get_Content().
asInt() > 0 )
2295 for(
int i=0, n=Header[
"NZ"].Get_Content().
asInt(); i<n; i++)
2310 bool CSG_Grids::_Save_Header(
CSG_File &Stream)
2358 return( Header.
Save(Stream) );
2367 bool CSG_Grids::_Load_Attributes(
CSG_File &Stream)
2377 if( Values.Get_Tokens_Count() == (
size_t)Attributes.Get_Field_Count() )
2383 pRecord->
Set_Value(iField, Values.Get_Next_Token());
2397 bool CSG_Grids::_Save_Attributes(
CSG_File &Stream)
2399 for(
int iRecord=0; iRecord<m_Attributes.
Get_Count(); iRecord++)
2403 Stream.
Write(m_Attributes[iRecord].asString(iField));
2428 for(
int y=0; y<
Get_NY(); y++)
2435 char *pValue = (
char *)Line.Get_Array();
2464 for(
int y=0; y<
Get_NY(); y++)
2466 char *pValue = (
char *)Line.Get_Array();
2500 bool CSG_Grids::_Assign_MeanValue (
CSG_Grids *pSource,
bool bVolumeProportional ) {
return(
false ); }
2501 bool CSG_Grids::_Assign_ExtremeValue (
CSG_Grids *pSource,
bool bMaximum ) {
return(
false ); }
2502 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 CSG_Grids & Multiply(double Value)
sLong Get_Max_Samples(void) const
#define SG_FREE_SAFE(PTR)
bool Set_Z(int i, double Value)
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,...)
TSG_Data_Type Get_Field_Type(int Field) const
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)
SAGA_API_DLL_EXPORT bool SG_File_Set_Extension(CSG_String &File, const CSG_String &Extension)
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
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Extension(const CSG_String &File, const CSG_String &Extension)
@ SG_UI_MSG_STYLE_SUCCESS
SAGA_API_DLL_EXPORT CSG_String SG_Get_String(double Value, int Precision=-99)
bool Create(const CSG_Grid &Grid)
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)
bool SG_UI_Process_Get_Okay(bool bBlink)
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
virtual const CSG_Rect & Get_Extent(void)
virtual bool Assign(double Value=0.)
virtual bool Destroy(void)
virtual bool On_Delete(void)
void Set_Scaling(double Scale=1., double Offset=0.)
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
double Get_Value(double x, double y, double z, CSG_Grid_Resampling Resampling=CSG_Grid_Resampling::Bicubic_2, CSG_Grid_Resampling ZResampling=CSG_Grid_Resampling::Undefined) 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
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
class CSG_Grids * asGrids(bool bPolymorph=false) const
int Get_nLineBytes(void) const
double Get_YMin(bool bCells=false) const
size_t Get_uSize(void) const
int SG_UI_Msg_Lock(bool bOn)
virtual void Set_Value(sLong i, double Value, bool bScaled=true)
const SG_Char * Get_Field_Name(int Field) const
virtual bool is_NoData(int x, int y, int z) const
virtual CSG_Grids & operator-=(double Value)
virtual bool Open(const SG_Char *FileName, int Mode=SG_FILE_R, bool bBinary=true, int Encoding=SG_FILE_ENCODING_ANSI)
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)
SAGA_API_DLL_EXPORT CSG_Strings SG_String_Tokenize(const CSG_String &String, const CSG_String &Delimiters=SG_DEFAULT_DELIMITERS, TSG_String_Tokenizer_Mode Mode=SG_TOKEN_DEFAULT)
const SG_Char * Get_File_Name(bool bNative=true) const
virtual bool Destroy(void)
virtual short asShort(int x, int y, bool bScaled=true) const
#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
virtual bool Assign(CSG_Data_Object *pTable, bool bProgress=false)
double Get_XMin(bool bCells=false) const
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
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)
class CSG_Grid * asGrid(bool bPolymorph=false) const
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 Read_Line(CSG_String &Line) const
virtual bool Del_Field(int Field)
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)
bool Set_Z_Attribute(int Field, bool bSetNameField=false)
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
virtual bool Set_Value(sLong Index, int Field, const SG_Char *Value)
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)
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