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);
167 double Get_X (
void)
const {
return( _Get_Field_Value(m_Cursor , 0) ); }
168 double Get_Y (
void)
const {
return( _Get_Field_Value(m_Cursor , 1) ); }
169 double Get_Z (
void)
const {
return( _Get_Field_Value(m_Cursor , 2) ); }
170 double Get_X (
sLong Index)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, 0) ); }
171 double Get_Y (
sLong Index)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, 1) ); }
172 double Get_Z (
sLong Index)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, 2) ); }
180 virtual double Get_Value (
int Field)
const {
return( _Get_Field_Value(m_Cursor , Field) ); }
181 virtual double Get_Value (
sLong Index,
int Field)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field) ); }
183 virtual bool Get_Value (
int Field, BYTE &Value)
const {
sLong v;
if(
Get_Value( Field, v) ) { Value = (BYTE )v;
return(
true ); }
return(
false ); }
184 virtual bool Get_Value (
int Field,
char &Value)
const {
sLong v;
if(
Get_Value( Field, v) ) { Value = (char )v;
return(
true ); }
return(
false ); }
185 virtual bool Get_Value (
int Field, WORD &Value)
const {
sLong v;
if(
Get_Value( Field, v) ) { Value = (WORD )v;
return(
true ); }
return(
false ); }
186 virtual bool Get_Value (
int Field,
short &Value)
const {
sLong v;
if(
Get_Value( Field, v) ) { Value = (short)v;
return(
true ); }
return(
false ); }
187 virtual bool Get_Value (
int Field, DWORD &Value)
const {
sLong v;
if(
Get_Value( Field, v) ) { Value = (DWORD)v;
return(
true ); }
return(
false ); }
188 virtual bool Get_Value (
int Field,
int &Value)
const {
sLong v;
if(
Get_Value( Field, v) ) { Value = (int )v;
return(
true ); }
return(
false ); }
190 virtual bool Get_Value (
int Field,
sLong &Value)
const {
return( _Get_Field_Value(m_Cursor , Field, Value) ); }
191 virtual bool Get_Value (
int Field,
double &Value)
const {
return( _Get_Field_Value(m_Cursor , Field, Value) ); }
192 virtual bool Get_Value (
int Field,
CSG_String &Value)
const {
return( _Get_Field_Value(m_Cursor , Field, Value) ); }
194 virtual bool Get_Value (
sLong Index,
int Field, BYTE &Value)
const {
sLong v;
if(
Get_Value(Index, Field, v) ) { Value = (BYTE )v;
return(
true ); }
return(
false ); }
195 virtual bool Get_Value (
sLong Index,
int Field,
char &Value)
const {
sLong v;
if(
Get_Value(Index, Field, v) ) { Value = (char )v;
return(
true ); }
return(
false ); }
196 virtual bool Get_Value (
sLong Index,
int Field, WORD &Value)
const {
sLong v;
if(
Get_Value(Index, Field, v) ) { Value = (WORD )v;
return(
true ); }
return(
false ); }
197 virtual bool Get_Value (
sLong Index,
int Field,
short &Value)
const {
sLong v;
if(
Get_Value(Index, Field, v) ) { Value = (short)v;
return(
true ); }
return(
false ); }
198 virtual bool Get_Value (
sLong Index,
int Field, DWORD &Value)
const {
sLong v;
if(
Get_Value(Index, Field, v) ) { Value = (DWORD)v;
return(
true ); }
return(
false ); }
199 virtual bool Get_Value (
sLong Index,
int Field,
int &Value)
const {
sLong v;
if(
Get_Value(Index, Field, v) ) { Value = (int )v;
return(
true ); }
return(
false ); }
201 virtual bool Get_Value (
sLong Index,
int Field,
sLong &Value)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, Value) ); }
202 virtual bool Get_Value (
sLong Index,
int Field,
double &Value)
const {
return( _Get_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, Value) ); }
205 virtual bool Set_Value (
int Field,
const BYTE &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
206 virtual bool Set_Value (
int Field,
const char &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
207 virtual bool Set_Value (
int Field,
const WORD &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
208 virtual bool Set_Value (
int Field,
const short &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
209 virtual bool Set_Value (
int Field,
const DWORD &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
210 virtual bool Set_Value (
int Field,
const int &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
211 virtual bool Set_Value (
int Field,
const long &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
212 virtual bool Set_Value (
int Field,
const uLong &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
213 virtual bool Set_Value (
int Field,
const sLong &Value) {
return( _Set_Field_Value(m_Cursor, Field , (
sLong)Value) ); }
214 virtual bool Set_Value (
int Field,
const double &Value) {
return( _Set_Field_Value(m_Cursor, Field , Value) ); }
215 virtual bool Set_Value (
int Field,
const SG_Char *Value) {
return( _Set_Field_Value(m_Cursor, Field , Value) ); }
217 virtual bool Set_Value (
sLong Index,
int Field,
const BYTE &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, (
sLong)Value) ); }
218 virtual bool Set_Value (
sLong Index,
int Field,
const char &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, (
sLong)Value) ); }
219 virtual bool Set_Value (
sLong Index,
int Field,
const WORD &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, (
sLong)Value) ); }
220 virtual bool Set_Value (
sLong Index,
int Field,
const short &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, (
sLong)Value) ); }
221 virtual bool Set_Value (
sLong Index,
int Field,
const DWORD &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, (
sLong)Value) ); }
222 virtual bool Set_Value (
sLong Index,
int Field,
const int &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, (
sLong)Value) ); }
223 virtual bool Set_Value (
sLong Index,
int Field,
const long &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, (
sLong)Value) ); }
226 virtual bool Set_Value (
sLong Index,
int Field,
const double &Value) {
return( _Set_Field_Value(Index >= 0 && Index <
m_nRecords ? m_Points[Index] : NULL, Field, Value) ); }
227 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) ); }
304 virtual bool Select (
sLong Index ,
bool bInvert =
false);
332 bool m_bXYZPrecDbl =
true;
334 char **m_Points = NULL, *m_Cursor = NULL;
336 int m_nPointBytes = 0, *m_Field_Offset = NULL;
350 bool _Set_Field_Value (
char *Record,
int Field,
const sLong &Value);
351 bool _Set_Field_Value (
char *Record,
int Field,
const double &Value);
352 bool _Set_Field_Value (
char *Record,
int Field,
const SG_Char *Value);
354 double _Get_Field_Value (
char *Record,
int Field )
const;
355 bool _Get_Field_Value (
char *Record,
int Field,
sLong &Value)
const;
356 bool _Get_Field_Value (
char *Record,
int Field,
double &Value)
const;
357 bool _Get_Field_Value (
char *Record,
int Field,
CSG_String &Value)
const;
359 bool _Inc_Array (
void);
360 bool _Dec_Array (
void);
363 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)
virtual bool Get_Value(int Field, int &Value) const
bool Get_Attribute(int Field, short &Value) const
virtual bool is_NoData(int Field) const
bool Set_Attribute(int Field, const char &Value)
double Get_Attribute(int Field) const
double Get_Y(sLong Index) const
virtual bool Set_Value(int Field, const char &Value)
bool Set_Cursor(sLong Index)
virtual bool Get_Value(sLong Index, int Field, double &Value) const
virtual bool Set_NoData(sLong Index, int Field)
bool Get_Attribute(int Field, WORD &Value) const
virtual bool Del_Shapes(void)
double Get_X(sLong Index) const
virtual bool Set_Value(int Field, const WORD &Value)
int Get_Attribute_Length(int Field, int Encoding=SG_FILE_ENCODING_UNDEFINED) const
virtual bool Get_Value(int Field, CSG_String &Value) const
virtual bool Set_Value(sLong Index, int Field, const DWORD &Value)
const SG_Char * Get_Attribute_Name(int Field) const
virtual bool Get_Value(sLong Index, int Field, uLong &Value) const
bool Set_Attribute(sLong Index, int Field, const char &Value)
virtual bool Set_Value(int Field, const double &Value)
virtual bool Set_Value(int Field, const short &Value)
bool Get_Attribute(int Field, char &Value) const
bool Get_Attribute(sLong Index, int Field, short &Value) const
bool Set_Attribute(sLong Index, int Field, const double &Value)
bool Get_Attribute(sLong Index, int Field, sLong &Value) const
virtual bool Set_Value(sLong Index, int Field, const sLong &Value)
bool Get_Attribute(sLong Index, int Field, double &Value) const
bool Set_Attribute(int Field, const int &Value)
virtual bool Get_Value(int Field, BYTE &Value) const
virtual void Set_Modified(bool bModified=true)
bool Set_Attribute(sLong Index, int Field, const BYTE &Value)
bool Set_Attribute(int Field, const SG_Char *Value)
bool Set_Attribute(sLong Index, int Field, const int &Value)
virtual bool Del_Record(sLong Index)
virtual bool is_NoData(sLong Index, int Field) const
bool Set_Attribute(int Field, const WORD &Value)
int Get_Attribute_Count(void) const
virtual double Get_Value(int Field) const
virtual bool Get_Value(sLong Index, int Field, sLong &Value) const
virtual bool Set_Value(int Field, const BYTE &Value)
bool Set_Attribute(int Field, const long &Value)
virtual bool Get_Value(sLong Index, int Field, CSG_String &Value) const
bool Get_Attribute(sLong Index, int Field, uLong &Value) const
virtual bool Set_Value(int Field, const SG_Char *Value)
bool Get_Attribute(sLong Index, int Field, CSG_String &Value) const
virtual bool Get_Value(sLong Index, int Field, short &Value) const
double Get_Z(sLong Index) const
virtual bool Get_Value(int Field, sLong &Value) const
bool Set_Attribute(int Field, const DWORD &Value)
bool Set_Attribute(int Field, const double &Value)
virtual bool Set_Value(sLong Index, int Field, const uLong &Value)
bool Get_Attribute(sLong Index, int Field, DWORD &Value) const
bool Get_Attribute(int Field, double &Value) 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.
virtual bool Set_Value(int Field, const sLong &Value)
virtual bool Get_Value(int Field, char &Value) const
TSG_Data_Type Get_Attribute_Type(int Field) const
virtual bool Get_Value(sLong Index, int Field, DWORD &Value) const
bool Get_Attribute(sLong Index, int Field, char &Value) const
bool Get_Attribute(int Field, CSG_String &Value) const
virtual bool Set_Value(sLong Index, int Field, const long &Value)
virtual bool Set_Value(sLong Index, int Field, const char &Value)
virtual bool Set_Value(sLong Index, int Field, const double &Value)
virtual bool Set_Value(int Field, const uLong &Value)
bool Get_Attribute(sLong Index, int Field, BYTE &Value) const
virtual bool Get_Value(sLong Index, int Field, char &Value) const
bool Set_Attribute(int Field, const uLong &Value)
bool Set_Attribute(sLong Index, int Field, const WORD &Value)
virtual bool Get_Value(int Field, short &Value) const
virtual bool Get_Value(int Field, uLong &Value) const
bool Set_Attribute(sLong Index, int Field, const sLong &Value)
virtual bool is_Valid(void) const
bool Get_Attribute(int Field, BYTE &Value) const
virtual bool Save(const wchar_t *File, int Format=0)
virtual bool Get_Value(int Field, WORD &Value) const
bool Set_Attribute(sLong Index, int Field, const long &Value)
virtual bool Set_Value(sLong Index, int Field, const WORD &Value)
virtual bool Del_Shape(sLong Index)
bool Set_Attribute(sLong Index, int Field, const short &Value)
bool Set_Attribute(sLong Index, int Field, const uLong &Value)
bool Get_Attribute(sLong Index, int Field, int &Value) const
bool Set_Attribute(sLong Index, int Field, const SG_Char *Value)
virtual bool Set_Value(sLong Index, int Field, const short &Value)
virtual double Get_Value(sLong Index, int Field) const
virtual bool Del_Shape(CSG_Shape *pShape)
virtual bool Set_Value(int Field, const int &Value)
virtual bool Set_Value(sLong Index, int Field, const SG_Char *Value)
virtual bool Set_Value(int Field, const long &Value)
bool Get_Attribute(sLong Index, int Field, WORD &Value) const
bool Get_Attribute(int Field, uLong &Value) const
bool Set_Attribute(int Field, const BYTE &Value)
virtual bool Get_Value(sLong Index, int Field, int &Value) const
virtual bool Get_Value(sLong Index, int Field, WORD &Value) const
virtual bool Get_Value(int Field, double &Value) const
double Get_Attribute(sLong Index, int Field) const
bool Set_Attribute(int Field, const short &Value)
virtual bool Set_NoData(int Field)
virtual bool Get_Value(sLong Index, int Field, BYTE &Value) const
virtual bool Set_Value(int Field, const DWORD &Value)
virtual bool Del_Records(void)
bool Get_Attribute(int Field, DWORD &Value) const
virtual bool Save(const char *File, int Format=0)
virtual bool Set_Value(sLong Index, int Field, const int &Value)
virtual bool Get_Value(int Field, DWORD &Value) const
bool Get_Attribute(int Field, int &Value) const
virtual bool Set_Value(sLong Index, int Field, const BYTE &Value)
bool Set_Attribute(int Field, const sLong &Value)
bool Set_Attribute(sLong Index, int Field, const DWORD &Value)
void Set_XYZ_Precision(bool bDouble)
bool Get_Attribute(int Field, sLong &Value) const
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 bool Set_Value(sLong Index, int Field, const SG_Char *Value)
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_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)