SAGA API  v9.6
CSG_KDTree_2D Class Reference

#include <shapes.h>

Inheritance diagram for CSG_KDTree_2D:
CSG_KDTree

Public Member Functions

 CSG_KDTree_2D (void)
 
virtual ~CSG_KDTree_2D (void)
 
 CSG_KDTree_2D (CSG_Shapes *pPoints, int Field=-1)
 
bool Create (CSG_Shapes *pPoints, int Field=-1)
 
 CSG_KDTree_2D (CSG_PointCloud *pPoints)
 
bool Create (CSG_PointCloud *pPoints)
 
 CSG_KDTree_2D (const CSG_Matrix &Points)
 
bool Create (const CSG_Matrix &Points)
 
 CSG_KDTree_2D (const double **Points, size_t nPoints)
 
bool Create (const double **Points, size_t nPoints)
 
virtual bool Destroy (void)
 
virtual double Get_Point_Value (size_t i) const
 
virtual size_t Get_Nearest_Points (double Coordinate[2], size_t Count, double Radius)
 
virtual size_t Get_Nearest_Points (double Coordinate[2], size_t Count, double Radius, CSG_Array_sLong &Indices, CSG_Vector &Distances)
 
virtual size_t Get_Nearest_Points (double Coordinate[2], size_t Count, size_t *Indices, double *Distances)
 
virtual bool Get_Nearest_Point (double Coordinate[2], size_t &Index, double &Distance)
 
virtual bool Get_Nearest_Point (double Coordinate[2], size_t &Index)
 
virtual bool Get_Nearest_Value (double Coordinate[2], double &Value)
 
virtual CSG_ShapeGet_Nearest_Shape (double Coordinate[2])
 
virtual size_t Get_Duplicates (double Coordinate[2], CSG_Array_sLong &Indices, CSG_Vector &Distances)
 
virtual size_t Get_Duplicates (double Coordinate[2])
 
virtual size_t Get_Nearest_Points (double x, double y, size_t Count, double Radius)
 
virtual size_t Get_Nearest_Points (double x, double y, size_t Count, double Radius, CSG_Array_sLong &Indices, CSG_Vector &Distances)
 
virtual size_t Get_Nearest_Points (double x, double y, size_t Count, size_t *Indices, double *Distances)
 
virtual bool Get_Nearest_Point (double x, double y, size_t &Index, double &Distance)
 
virtual bool Get_Nearest_Point (double x, double y, size_t &Index)
 
virtual bool Get_Nearest_Value (double x, double y, double &Value)
 
virtual CSG_ShapeGet_Nearest_Shape (double x, double y)
 
virtual size_t Get_Duplicates (double x, double y, CSG_Array_sLong &Indices, CSG_Vector &Distances)
 
virtual size_t Get_Duplicates (double x, double y)
 
- Public Member Functions inherited from CSG_KDTree
 CSG_KDTree (void)
 
virtual ~CSG_KDTree (void)
 
bool is_Okay (void) const
 
size_t Get_Match_Count (void) const
 
size_t Get_Match_Index (size_t i) const
 
double Get_Match_Distance (size_t i) const
 
CSG_ShapeGet_Match_Shape (size_t i) const
 
int Get_Point_Count (void) const
 
double * Get_Point (int i) const
 
double * Get_Point (size_t i) const
 
double * operator[] (int i) const
 
double * operator[] (size_t i) const
 
virtual double Get_Point_Value (int i) const
 

Additional Inherited Members

- Static Public Member Functions inherited from CSG_KDTree
static const char * Get_Version (void)
 
- Protected Member Functions inherited from CSG_KDTree
void _On_Construction (void)
 
- Protected Attributes inherited from CSG_KDTree
class CSG_KDTree_Adaptor * m_pAdaptor
 
void * m_pKDTree
 
CSG_Array_sLong m_Indices
 
CSG_Vector m_Distances
 
CSG_Matrix m_Points
 

Detailed Description

Definition at line 1264 of file shapes.h.

Constructor & Destructor Documentation

◆ CSG_KDTree_2D() [1/5]

CSG_KDTree_2D::CSG_KDTree_2D ( void  )

Default constructor.

Definition at line 318 of file kdtree.cpp.

References CSG_KDTree::_On_Construction().

◆ ~CSG_KDTree_2D()

CSG_KDTree_2D::~CSG_KDTree_2D ( void  )
virtual

Definition at line 324 of file kdtree.cpp.

References Destroy().

◆ CSG_KDTree_2D() [2/5]

CSG_KDTree_2D::CSG_KDTree_2D ( CSG_Shapes pPoints,
int  Field = -1 
)

Creates a spatial index for the given points. If 'Field' refers to a valid field, an internal points arrray is created which omits points with no-data entries for the given field.

Definition at line 336 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

◆ CSG_KDTree_2D() [3/5]

CSG_KDTree_2D::CSG_KDTree_2D ( CSG_PointCloud pPoints)

Creates a spatial index for the given points.

Definition at line 404 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

◆ CSG_KDTree_2D() [4/5]

CSG_KDTree_2D::CSG_KDTree_2D ( const CSG_Matrix Points)

Points matrix is expected to provide coordinates ordered in rows, with first and second column holding x and y coordinate.

Definition at line 434 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

◆ CSG_KDTree_2D() [5/5]

CSG_KDTree_2D::CSG_KDTree_2D ( const double **  Points,
size_t  nPoints 
)

Points array is expected to provide coordinates ordered in rows, with first and second column holding x and y coordinate.

Definition at line 457 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

Member Function Documentation

◆ Create() [1/4]

bool CSG_KDTree_2D::Create ( const CSG_Matrix Points)

◆ Create() [2/4]

bool CSG_KDTree_2D::Create ( const double **  Points,
size_t  nPoints 
)

Definition at line 464 of file kdtree.cpp.

References Destroy(), CSG_KDTree::m_pAdaptor, and CSG_KDTree::m_pKDTree.

◆ Create() [3/4]

bool CSG_KDTree_2D::Create ( CSG_PointCloud pPoints)

◆ Create() [4/4]

◆ Destroy()

bool CSG_KDTree_2D::Destroy ( void  )
virtual

Reimplemented from CSG_KDTree.

Definition at line 482 of file kdtree.cpp.

References CSG_KDTree::Destroy(), and CSG_KDTree::m_pKDTree.

Referenced by Create(), CSG_Parameters_Point_Search_KDTree_2D::Finalize(), and ~CSG_KDTree_2D().

◆ Get_Duplicates() [1/4]

size_t CSG_KDTree_2D::Get_Duplicates ( double  Coordinate[2])
virtual

Definition at line 640 of file kdtree.cpp.

References Get_Duplicates(), CSG_KDTree::m_Distances, and CSG_KDTree::m_Indices.

◆ Get_Duplicates() [2/4]

size_t CSG_KDTree_2D::Get_Duplicates ( double  Coordinate[2],
CSG_Array_sLong Indices,
CSG_Vector Distances 
)
virtual

◆ Get_Duplicates() [3/4]

size_t CSG_KDTree_2D::Get_Duplicates ( double  x,
double  y 
)
virtual

Definition at line 686 of file kdtree.cpp.

References Get_Duplicates().

◆ Get_Duplicates() [4/4]

size_t CSG_KDTree_2D::Get_Duplicates ( double  x,
double  y,
CSG_Array_sLong Indices,
CSG_Vector Distances 
)
virtual

Definition at line 681 of file kdtree.cpp.

References Get_Duplicates().

◆ Get_Nearest_Point() [1/4]

bool CSG_KDTree_2D::Get_Nearest_Point ( double  Coordinate[2],
size_t &  Index 
)
virtual

Definition at line 578 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Point() [2/4]

bool CSG_KDTree_2D::Get_Nearest_Point ( double  Coordinate[2],
size_t &  Index,
double &  Distance 
)
virtual

Definition at line 572 of file kdtree.cpp.

References Get_Nearest_Points().

Referenced by Get_Nearest_Point(), and Get_Nearest_Shape().

◆ Get_Nearest_Point() [3/4]

bool CSG_KDTree_2D::Get_Nearest_Point ( double  x,
double  y,
size_t &  Index 
)
virtual

Definition at line 666 of file kdtree.cpp.

References Get_Nearest_Point().

◆ Get_Nearest_Point() [4/4]

bool CSG_KDTree_2D::Get_Nearest_Point ( double  x,
double  y,
size_t &  Index,
double &  Distance 
)
virtual

Definition at line 661 of file kdtree.cpp.

References Get_Nearest_Point().

◆ Get_Nearest_Points() [1/6]

size_t CSG_KDTree_2D::Get_Nearest_Points ( double  Coordinate[2],
size_t  Count,
double  Radius 
)
virtual

◆ Get_Nearest_Points() [2/6]

size_t CSG_KDTree_2D::Get_Nearest_Points ( double  Coordinate[2],
size_t  Count,
double  Radius,
CSG_Array_sLong Indices,
CSG_Vector Distances 
)
virtual

◆ Get_Nearest_Points() [3/6]

size_t CSG_KDTree_2D::Get_Nearest_Points ( double  Coordinate[2],
size_t  Count,
size_t *  Indices,
double *  Distances 
)
virtual

Definition at line 559 of file kdtree.cpp.

References CSG_KDTree::m_pKDTree.

◆ Get_Nearest_Points() [4/6]

size_t CSG_KDTree_2D::Get_Nearest_Points ( double  x,
double  y,
size_t  Count,
double  Radius 
)
virtual

Definition at line 646 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Points() [5/6]

size_t CSG_KDTree_2D::Get_Nearest_Points ( double  x,
double  y,
size_t  Count,
double  Radius,
CSG_Array_sLong Indices,
CSG_Vector Distances 
)
virtual

Definition at line 651 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Points() [6/6]

size_t CSG_KDTree_2D::Get_Nearest_Points ( double  x,
double  y,
size_t  Count,
size_t *  Indices,
double *  Distances 
)
virtual

Definition at line 656 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Shape() [1/2]

CSG_Shape * CSG_KDTree_2D::Get_Nearest_Shape ( double  Coordinate[2])
virtual

Definition at line 601 of file kdtree.cpp.

References Get_Nearest_Point(), CSG_Shapes::Get_Shape(), and CSG_KDTree::m_pAdaptor.

Referenced by Get_Nearest_Shape().

◆ Get_Nearest_Shape() [2/2]

CSG_Shape * CSG_KDTree_2D::Get_Nearest_Shape ( double  x,
double  y 
)
virtual

Definition at line 676 of file kdtree.cpp.

References Get_Nearest_Shape().

◆ Get_Nearest_Value() [1/2]

bool CSG_KDTree_2D::Get_Nearest_Value ( double  Coordinate[2],
double &  Value 
)
virtual

◆ Get_Nearest_Value() [2/2]

bool CSG_KDTree_2D::Get_Nearest_Value ( double  x,
double  y,
double &  Value 
)
virtual

Definition at line 671 of file kdtree.cpp.

References Get_Nearest_Value().

◆ Get_Point_Value()

virtual double CSG_KDTree_2D::Get_Point_Value ( size_t  i) const
inlinevirtual

Implements CSG_KDTree.

Definition at line 1284 of file shapes.h.

Referenced by Get_Nearest_Value().


The documentation for this class was generated from the following files: