51#ifndef HEADER_INCLUDED__SAGA_API__pointcloud_H
52#define HEADER_INCLUDED__SAGA_API__pointcloud_H
117 bool Create (
const char *File);
119 bool Create (
const wchar_t *File);
134 virtual bool Save (
const wchar_t *File,
int Format = 0) {
return(
Save(
CSG_String(File), Format) ); }
147 virtual bool Mov_Field (
int Field,
int Position);
159 bool Add_Point (
double x,
double y,
double z);
161 bool Del_Point (
sLong Index);
162 bool Del_Points (
void);
166 virtual bool Set_Value (
int Field,
double Value) {
return( _Set_Field_Value(m_Cursor, Field, Value) ); }
167 virtual double Get_Value (
int Field)
const {
return( _Get_Field_Value(m_Cursor, Field) ); }
168 double Get_X (
void)
const {
return( _Get_Field_Value(m_Cursor, 0) ); }
169 double Get_Y (
void)
const {
return( _Get_Field_Value(m_Cursor, 1) ); }
170 double Get_Z (
void)
const {
return( _Get_Field_Value(m_Cursor, 2) ); }
176 virtual bool Set_Value (
sLong Index,
int Field,
double Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, Value) ); }
177 virtual double Get_Value (
sLong Index,
int Field)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field) ); }
178 double Get_X (
sLong Index)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, 0) ); }
179 double Get_Y (
sLong Index)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, 1) ); }
180 double Get_Z (
sLong Index)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, 2) ); }
186 virtual bool Get_Value (
sLong Index,
int Field,
double &Value)
const {
if( Index >= 0 && Index <
m_nRecords ) { Value = _Get_Field_Value(m_Points[Index], Field);
return( !
is_NoData_Value(Value) ); }
return(
false ); }
189 virtual bool Set_Value (
int Field,
const SG_Char *Value) {
return( _Set_Field_Value(m_Cursor, Field, Value) ); }
190 virtual bool Get_Value (
int Field,
CSG_String &Value)
const {
return( _Get_Field_Value(m_Cursor, Field, Value) ); }
191 virtual bool Set_Value (
sLong Index,
int Field,
const SG_Char *Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, Value) ); }
224 virtual bool Select (
sLong Index ,
bool bInvert =
false);
226 virtual bool Select (
const TSG_Rect &Extent ,
bool bInvert =
false);
252 bool m_bXYZPrecDbl =
true;
254 char **m_Points = NULL, *m_Cursor = NULL;
256 int m_nPointBytes = 0, *m_Field_Offset = NULL;
269 bool _Set_Field_Value (
char *pPoint,
int Field,
double Value);
270 double _Get_Field_Value (
char *pPoint,
int Field )
const;
271 bool _Set_Field_Value (
char *pPoint,
int Field,
const SG_Char *Value);
272 bool _Get_Field_Value (
char *pPoint,
int Field,
CSG_String &Value)
const;
274 bool _Inc_Array (
void);
275 bool _Dec_Array (
void);
278 void _Shape_Flush (
void);
#define SAGA_API_DLL_EXPORT
@ SG_FILE_ENCODING_UNDEFINED
bool is_NoData_Value(double Value) const
double Get_NoData_Value(bool bUpper=false) const
virtual void Set_Modified(bool bOn=true)
bool Del_Point(sLong Index)
bool Set_Attribute(int Field, double Value)
double Get_Attribute(int Field) const
double Get_Y(sLong Index) const
bool Set_Cursor(sLong Index)
virtual bool Get_Value(sLong Index, int Field, double &Value) const
virtual bool Del_Shapes(void)
virtual bool Get_Attribute(int Field, CSG_String &Value) const
bool is_NoData(sLong Index, int Field) const
double Get_X(sLong Index) const
int Get_Attribute_Length(int Field, int Encoding=SG_FILE_ENCODING_UNDEFINED) const
virtual bool Get_Value(int Field, CSG_String &Value) const
const SG_Char * Get_Attribute_Name(int Field) const
virtual void Set_Modified(bool bModified=true)
virtual bool Del_Record(sLong Index)
int Get_Attribute_Count(void) const
virtual double Get_Value(int Field) const
virtual bool Set_Attribute(int Field, const SG_Char *Value)
virtual bool Get_Value(sLong Index, int Field, CSG_String &Value) const
virtual bool Set_Value(int Field, const SG_Char *Value)
bool Set_Attribute(sLong Index, int Field, double Value)
double Get_Z(sLong Index) const
virtual TSG_Data_Object_Type Get_ObjectType(void) const
Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking.
TSG_Data_Type Get_Attribute_Type(int Field) const
bool Set_NoData(sLong Index, int Field)
virtual bool Set_Attribute(sLong Index, int Field, const SG_Char *Value)
virtual bool Set_Value(sLong Index, int Field, double Value)
virtual bool Set_Value(int Field, double Value)
virtual bool is_Valid(void) const
virtual bool Save(const wchar_t *File, int Format=0)
virtual bool Del_Shape(sLong Index)
virtual bool Get_Attribute(sLong Index, int Field, double &Value) const
bool is_NoData(int Field) const
virtual double Get_Value(sLong Index, int Field) const
virtual bool Del_Shape(CSG_Shape *pShape)
virtual bool Set_Value(sLong Index, int Field, const SG_Char *Value)
double Get_Attribute(sLong Index, int Field) const
virtual bool Get_Attribute(sLong Index, int Field, CSG_String &Value) const
virtual bool Del_Records(void)
bool Set_NoData(int Field)
virtual bool Save(const char *File, int Format=0)
void Set_XYZ_Precision(bool bDouble)
virtual bool Assign(CSG_Data_Object *pObject, bool bProgress=false)
virtual CSG_Shape * Add_Shape(CSG_Table_Record *pCopy=NULL, TSG_ADD_Shape_Copy_Mode mCopy=SHAPE_COPY)
virtual bool On_Delete(void)
virtual bool Save(const CSG_String &File, int Format=0)
virtual CSG_Shape * Get_Shape(const CSG_Point &Point, double Epsilon=0.)
virtual void _On_Construction(void)
virtual bool Destroy(void)
virtual const CSG_Rect & Get_Selection_Extent(void)
virtual bool On_Update(void)
virtual bool Select(sLong Index, bool bInvert=false)
virtual bool On_Reload(void)
virtual CSG_Table_Record * Ins_Record(sLong Index, CSG_Table_Record *pCopy=NULL)
virtual bool _Stats_Update(int Field) const
bool is_Compatible(const CSG_Table &Table, bool bExactMatch=false) const
CSG_Field_Info ** m_Field_Info
virtual bool Get_Value(sLong Index, int Field, CSG_String &Value) const
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
virtual sLong Inv_Selection(void)
virtual bool Mov_Field(int Field, int Position)
virtual CSG_Table_Record * Get_Record(sLong Index) const
virtual int Get_Field_Length(int Field, int Encoding=SG_FILE_ENCODING_UNDEFINED) const
virtual CSG_Table_Record * Get_Selection(sLong Index=0) const
bool Sort(const char *Field, bool bAscending=true)
virtual bool is_Selected(sLong Index) const
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
virtual bool Set_Value(sLong Index, int Field, const SG_Char *Value)
virtual bool Set_Field_Type(int Field, TSG_Data_Type Type)
virtual bool Del_Field(int Field)
virtual sLong Del_Selection(void)
@ SG_DATAOBJECT_TYPE_PointCloud
@ POINTCLOUD_FILE_FORMAT_Compressed
@ POINTCLOUD_FILE_FORMAT_Undefined
@ POINTCLOUD_FILE_FORMAT_Normal
SAGA_API_DLL_EXPORT CSG_PointCloud * SG_Create_PointCloud(void)