 |
SAGA API
v9.2
|
Go to the documentation of this file.
55 #include <wx/string.h>
81 default :
return(
"UNDEFINED" );
96 default :
return(
_TL(
"Undefined" ) );
111 default :
return(
"CSG_DataObject" );
128 if( Max_Samples >= 0 )
187 m_MetaData.
Set_Name(
"SAGA_METADATA");
194 m_File_bNative =
false;
198 m_NoData_Value[0] = -99999.;
199 m_NoData_Value[1] = -99999.;
204 m_Description .
Clear();
239 m_Name =
_TL(
"Data");
255 wxString _Format(Format); _Format.Replace(
"%s",
"%ls");
256 va_start(argptr, _Format); _s.PrintfV(_Format, argptr);
258 va_start(argptr, Format); _s.PrintfV( Format, argptr);
276 wxString _Format(Format); _Format.Replace(
"%s",
"%ls");
277 va_start(argptr, _Format); _s.PrintfV(_Format, argptr);
279 va_start(argptr, Format); _s.PrintfV( Format, argptr);
298 m_Description = Description;
318 m_File_bNative =
false;
323 m_FileName = FileName;
324 m_File_bNative = bNative;
333 if( bNative && !m_File_bNative )
346 return( m_FileName.
c_str() );
352 return( m_File_Type );
402 m_File_bNative =
false;
523 double d = Lower; Lower = Upper; Upper = d;
526 if( Lower != m_NoData_Value[0] || Upper != m_NoData_Value[1] )
528 m_NoData_Value[0] = Lower;
529 m_NoData_Value[1] = Upper;
560 #define Min_Samples 100
562 if( m_Max_Samples != Max_Samples && Max_Samples >=
Min_Samples )
564 m_Max_Samples = Max_Samples;
609 default:
return(
false );
631 default:
return(
false );
644 if( !m.
Load(Stream) )
650 if( m(
"DESCRIPTION") && !m[
"DESCRIPTION"].Get_Content().is_Empty() )
696 if( m_MetaData(
"DESCRIPTION") )
710 return( m_MetaData.
Save(Stream) );
716 if( m_bUpdate || bForce )
virtual bool Assign(CSG_Data_Object *pObject)
CSG_Data_Object * m_pOwner
virtual bool On_Reload(void)=0
void Set_File_Name(const CSG_String &FileName)
virtual bool On_Delete(void)=0
CSG_MetaData & Get_History(void)
const SG_Char * Get_Description(void) const
bool Update(bool bForce=false)
CSG_String SG_Get_DataObject_Name(TSG_Data_Object_Type Type)
bool Save_MetaData(const CSG_String &FileName)
const SG_Char * Get_Name(void) const
@ SG_DATAOBJECT_TYPE_Grids
class CSG_TIN * asTIN(bool bPolymorph=false) const
void * SG_Get_Create_Pointer(void)
SAGA_API_DLL_EXPORT bool SG_File_Delete(const CSG_String &FileName)
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)
void Set_Update_Flag(bool bOn=true)
TSG_Projection_Type Get_Type(void) const
class CSG_Shapes * asShapes(bool bPolymorph=false) const
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Name(const CSG_String &full_Path, bool bExtension)
bool Load(const CSG_String &FileName, TSG_Projection_Format Format=SG_PROJ_FMT_WKT)
SAGA_API_DLL_EXPORT bool SG_File_Exists(const CSG_String &FileName)
virtual bool On_NoData_Changed(void)
class CSG_Grids * asGrids(bool bPolymorph=false) const
sLong SG_DataObject_Get_Max_Samples(void)
CSG_String SG_Get_DataObject_Identifier(TSG_Data_Object_Type Type)
#define DATAOBJECT_CREATE
void SG_Set_History_Depth(int Depth)
virtual bool On_Update(void)
const SG_Char * Get_File_Name(bool bNative=true) const
void SG_Set_History_Ignore_Lists(int Ignore)
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Extension(const CSG_String &FileName)
virtual void Set_Modified(bool bOn=true)
class CSG_Table * asTable(bool bPolymorph=false) const
@ SG_DATAOBJECT_TYPE_Grid
bool SG_DataObject_Set_Max_Samples(sLong Max_Samples)
void Set_Name(const CSG_String &Name)
@ SG_DATAOBJECT_TYPE_Shapes
SAGA_API_DLL_EXPORT bool SG_File_Set_Extension(CSG_String &FileName, const CSG_String &Extension)
bool Get_Update_Flag(void)
bool Delete(void)
Deletes all files associated with this data object if possible. Works only with native SAGA files....
int SG_Get_History_Ignore_Lists(void)
#define SG_META_PROJECTION
class CSG_Grid * asGrid(bool bPolymorph=false) const
@ SG_DATAOBJECT_TYPE_Table
void Set_Description(const CSG_String &Description)
bool Save_History_to_Model(const CSG_String &File) const
int SG_Get_History_Depth(void)
bool is_Empty(void) const
int Get_File_Type(void) const
int g_History_Ignore_Lists
bool Load_MetaData(const CSG_String &FileName)
void Fmt_Name(const char *Format,...)
class CSG_PointCloud * asPointCloud(bool bPolymorph=false) const
virtual bool Set_NoData_Value(double Value)
bool Save(const CSG_String &FileName, TSG_Projection_Format Format=SG_PROJ_FMT_WKT) const
const SG_Char * c_str(void) const
bool Reload(void)
If there is an associated file data can be reloaded with this command.
virtual ~CSG_Data_Object(void)
virtual bool Set_NoData_Value_Range(double Lower, double Upper)
CSG_Projection & Get_Projection(void)
virtual bool Destroy(void)
CSG_String SG_Get_DataObject_Class_Name(TSG_Data_Object_Type Type)
@ SG_DATAOBJECT_TYPE_PointCloud
static sLong gSG_DataObject_Max_Samples