53#ifndef HEADER_INCLUDED__SAGA_API__shapes_H 
   54#define HEADER_INCLUDED__SAGA_API__shapes_H 
  170        virtual int                                     Add_Point                      (
double x, 
double y,                    
int iPart = 0) = 0;
 
  175        virtual int                                     Ins_Point                      (
double x, 
double y,    
int iPoint    , 
int iPart = 0) = 0;
 
  180        virtual int                                     Set_Point                      (
double x, 
double y,    
int iPoint = 0, 
int iPart = 0) = 0;
 
  185        virtual int                                     Del_Point                      (                       
int iPoint    , 
int iPart = 0) = 0;
 
  191        virtual void                            Set_Z                              (
double z, 
int iPoint = 0, 
int iPart = 0)                     {               }
 
  192        virtual double                          Get_Z                              (
int iPoint = 0, 
int iPart = 0, 
bool bAscending = 
true)
 const { 
return( 0. ); }
 
  201                Point.
z = 
Get_Z(iPoint, iPart, bAscending);
 
 
  207        virtual void                            Set_M                              (
double m, 
int iPoint = 0, 
int iPart = 0)                     {               }
 
  208        virtual double                          Get_M                              (
int iPoint = 0, 
int iPart = 0, 
bool bAscending = 
true)
 const { 
return( 0. ); }
 
  217                Point.
z = 
Get_Z(iPoint, iPart, bAscending);
 
  218                Point.
m = 
Get_M(iPoint, iPart, bAscending);
 
 
 
  267        virtual bool                            is_Valid                        (
void)
          const   {       
return( 
true ); }
 
  278        virtual int                                     Ins_Point                      (
double x, 
double y,    
int iPoint    , 
int iPart = 0) { 
return( 
Set_Point(x, y, 0) ); }
 
  288        virtual int                                     Del_Point                      (                       
int iPoint    , 
int iPart = 0) { 
return( -1 ); }
 
  295        virtual const CSG_Rect &        Get_Extent                      (
void);
 
 
  328        virtual double                          Get_Z                              (
int iPoint = 0, 
int iPart = 0, 
bool bAscending = 
true)
 const { 
return( m_Z ); }
 
 
  349        virtual double                          Get_M                              (
int iPoint = 0, 
int iPart = 0, 
bool bAscending = 
true)
 const { 
return( m_M ); }
 
 
  378        virtual bool                            Destroy                         (
void);
 
  401        int                                                     Ins_Point                       (
double x, 
double y   , 
int iPoint);
 
  406        int                                                     Set_Point                       (
double x, 
double y   , 
int iPoint);
 
  411        int                                                     Del_Point                       (                    
int iPoint);
 
  414        double                                          Get_Z                              (
int iPoint, 
bool bAscending = 
true)
 const { 
return( 
m_Z && iPoint >= 0 && iPoint < 
m_nPoints ?   
m_Z[bAscending ? iPoint : 
m_nPoints - 1 - iPoint] : 0. ); }
 
  423                Point.
z = 
Get_Z(iPoint, bAscending);
 
 
  429        double                                          Get_M                              (
int iPoint, 
bool bAscending = 
true)
 const { 
return( 
m_M && iPoint >= 0 && iPoint < 
m_nPoints ?      
m_M[bAscending ? iPoint : 
m_nPoints - 1 - iPoint] : 0. ); }
 
  438                Point.
z = 
Get_Z(iPoint, bAscending);
 
  439                Point.
m = 
Get_M(iPoint, bAscending);
 
 
  444        bool                                            Add_Points                      (
CSG_Shape_Part *pPoints, 
bool bAscending = 
true);
 
  446        bool                                            Revert_Points           (
void);
 
 
  497        virtual int                                     Add_Part                        (
class CSG_Shape_Part *pPart, 
bool bRevert = 
false);
 
  499        virtual int                                     Del_Part                        (
int iPart);
 
  500        virtual int                                     Del_Parts                       (
void);
 
  507        virtual int                                     Ins_Point                       (
double x, 
double y,    
int iPoint    , 
int iPart = 0);
 
  509        virtual int                                     Ins_Point                       (
const CSG_Point_3D &p, 
int iPoint    , 
int iPart = 0);
 
  510        virtual int                                     Ins_Point                       (
const CSG_Point_4D &p, 
int iPoint    , 
int iPart = 0);
 
  512        virtual int                                     Set_Point                       (
double x, 
double y,    
int iPoint = 0, 
int iPart = 0);
 
  514        virtual int                                     Set_Point                       (
const CSG_Point_3D &p, 
int iPoint = 0, 
int iPart = 0);
 
  515        virtual int                                     Set_Point                       (
const CSG_Point_4D &p, 
int iPoint = 0, 
int iPart = 0);
 
  517        virtual int                                     Del_Point                       (                       
int iPoint    , 
int iPart = 0);
 
  519        virtual TSG_Point                      Get_Point                       (
int iPoint = 0)                                
const;
 
  522                if( iPart >= 0 && iPart < 
m_nParts )
 
 
  530        virtual void                            Set_Z                              (
double z, 
int iPoint = 0, 
int iPart = 0)                               { 
if    ( iPart >= 0 && iPart < 
m_nParts ) 
m_pParts[iPart]->Set_Z(z, iPoint); }
 
  531        virtual double                          Get_Z                              (          
int iPoint = 0, 
int iPart = 0, 
bool bAscending = 
true)
 const { 
return( iPart >= 0 && iPart < 
m_nParts ? 
m_pParts[iPart]->
Get_Z(   iPoint, bAscending) : 0. ); }
 
  535        virtual void                            Set_M                              (
double m, 
int iPoint = 0, 
int iPart = 0)                               { 
if    ( iPart >= 0 && iPart < 
m_nParts ) 
m_pParts[iPart]->Set_M(m, iPoint); }
 
  536        virtual double                          Get_M                              (          
int iPoint = 0, 
int iPart = 0, 
bool bAscending = 
true)
 const { 
return( iPart >= 0 && iPart < 
m_nParts ? 
m_pParts[iPart]->
Get_M(   iPoint, bAscending) : 0. ); }
 
  544        virtual double                          Get_Distance            (
TSG_Point Point                            ) 
const;
 
  545        virtual double                          Get_Distance            (
TSG_Point Point                 , 
int iPart) 
const;
 
  583        void                                            _Update_Extent          (
void);
 
  585        virtual bool                            On_Assign                       (
CSG_Shape *pShape);
 
 
  609        double                                          Get_Length                      (
void);
 
  610        double                                          Get_Length                      (
int iPart);
 
 
  661        bool                                            is_OnEdge                       (
double x, 
double y);
 
  664        bool                                            Contains                        (
double x, 
double y);
 
 
  708        bool                                            is_Lake                         (
int iPart);
 
  710        bool                                            is_Clockwise            (
int iPart);
 
  712        double                                          Get_Perimeter           (
int iPart);
 
  713        double                                          Get_Perimeter           (
void);
 
  715        double                                          Get_Area                        (
int iPart);
 
  716        double                                          Get_Area                        (
void);
 
  727        bool                                            is_OnEdge                       (
const CSG_Point &p, 
int iPart);
 
  728        bool                                            is_OnEdge                       (
double x, 
double y, 
int iPart);
 
  730        bool                                            is_OnEdge                       (
double x, 
double y);
 
  732        bool                                            Contains                        (
const CSG_Point &p, 
int iPart);
 
  733        bool                                            Contains                        (
double x, 
double y, 
int iPart);
 
  735        bool                                            Contains                        (
double x, 
double y);
 
  740        double                                          Get_Shared_Length       (
CSG_Shape_Polygon *pPolygon, 
bool bVertexCheck, 
double Epsilon = 0.);
 
  756        virtual void                            _Invalidate                     (
void);
 
 
  783        bool                                                    Create            (
const char       *File);
 
  785        bool                                                    Create            (
const wchar_t    *File);
 
  800        virtual bool                                    Save                                    (
const CSG_String &File, 
int Format = 0);
 
  802        virtual bool                                    Save                                        (
const wchar_t    *File, 
int Format = 0)        {       
return( 
Save(
CSG_String(File), Format) ); }
 
  819        virtual bool                                    Del_Shape                               (
sLong Index);
 
  820        virtual bool                                    Del_Shape                               (
CSG_Shape *pShape);
 
  828        bool                                                    Make_Clean                              (
void);
 
  831        virtual const CSG_Rect &                Get_Selection_Extent    (
void);
 
  833        virtual bool                                    Select                                  (
sLong Index                    , 
bool bInvert = 
false);
 
  834        virtual bool                                    Select                                  (
CSG_Table_Record *pShape = NULL, 
bool bInvert = 
false);
 
  835        virtual bool                                    Select                                  (
const TSG_Rect &Extent         , 
bool bInvert = 
false);
 
  836        virtual bool                                    Select                                  (
const TSG_Point &Point         , 
bool bInvert = 
false);
 
 
  914        virtual bool                    is_Leaf                  (
void)
  const   {       
return( 
false );        }
 
  915        virtual bool                    is_Node                  (
void)
  const   {       
return( 
false );        }
 
  948                default: 
m_Extent.Assign(Extent); 
break;
 
 
 
  971        virtual bool                    is_Leaf                  (
void)
  const   {       
return( 
true );         }
 
 
 1048        virtual bool                    is_Node                  (
void)
  const   {       
return( 
true );         }
 
 1053        bool                                    Add_Point               (
double x, 
double y, 
double z);
 
 
 1114        bool                                            Create                                    (
CSG_Shapes *pShapes, 
int Attribute, 
bool bStatistics = 
false);
 
 1118        bool                                            Add_Point                              (
double x, 
double y, 
double z);
 
 1126        bool                                            is_Okay                                  (
void)
  const   {       
return( m_pRoot != NULL );      }
 
 1133        bool                                            Get_Nearest_Point               (
const TSG_Point &p, 
TSG_Point &Point, 
double &Value, 
double &Distance)       
const;
 
 1134        bool                                            Get_Nearest_Point               (
double x, 
double y, 
TSG_Point &Point, 
double &Value, 
double &Distance)        
const;
 
 1136        size_t                                          Get_Nearest_Points              (
CSG_Points_3D &Points, 
const TSG_Point &p, 
size_t maxPoints, 
double Radius = 0., 
int iQuadrant = -1)     
const;
 
 1137        size_t                                          Get_Nearest_Points              (
CSG_Points_3D &Points, 
double x, 
double y, 
size_t maxPoints, 
double Radius = 0., 
int iQuadrant = -1)      
const;
 
 1139        size_t                                          Select_Nearest_Points   (
const TSG_Point &p, 
size_t maxPoints, 
double Radius = 0., 
int iQuadrant = -1);
 
 1140        size_t                                          Select_Nearest_Points   (
double x, 
double y, 
size_t maxPoints, 
double Radius = 0., 
int iQuadrant = -1);
 
 1144        double                                          Get_Selected_Z                    (
size_t i)
 const        {       
return( i >= (
size_t)m_Selection.Get_Size() ?  0.  : (((TLeaf *)m_Selection.Get_Array()) + i)->pLeaf->Get_Z() );        }
 
 1145        double                                          Get_Selected_Distance      (
size_t i)
 const        {       
return( i >= (
size_t)m_Selection.Get_Size() ? -1.  : (((TLeaf *)m_Selection.Get_Array()) + i)->Distance       );        }
 
 1165        typedef struct SLeaf
 
 1180        CSG_Array                                       m_Selection;
 
 1182        CSG_PRQuadTree_Node                     *m_pRoot;
 
 1184        bool                                            _Check_Root                             (
double x, 
double y);
 
 1186        bool                                            _Quadrant_Contains              (
double x, 
double y, 
int iQuadrant, 
const TSG_Point &p)                                                
const;
 
 1187        bool                                            _Radius_Contains                (
double x, 
double y, 
double r, 
const TSG_Point &p)                                                     
const;
 
 1188        bool                                            _Radius_Contains                (
double x, 
double y, 
double r, 
int iQuadrant, 
const TSG_Point &p)                      
const;
 
 1189        bool                                            _Quadrant_Intersects    (
double x, 
double y, 
int iQuadrant, CSG_PRQuadTree_Item *pItem)                         
const;
 
 1190        bool                                            _Radius_Intersects              (
double x, 
double y, 
double r, CSG_PRQuadTree_Item *pItem)                                      
const;
 
 1191        bool                                            _Radius_Intersects              (
double x, 
double y, 
double r, 
int iQuadrant, CSG_PRQuadTree_Item *pItem)       
const;
 
 1193        CSG_PRQuadTree_Leaf     *               _Get_Nearest_Point              (CSG_PRQuadTree_Item *pItem, 
double x, 
double y, 
double &Distance)                      
const;
 
 1195        TLeaf *                                         _Get_Selected                   (
const CSG_Array &Selection, 
size_t i)                                                                          
const;
 
 1196        bool                                            _Add_Selected                   (      CSG_Array &Selection          , CSG_PRQuadTree_Leaf *pLeaf, 
double Distance)     
const;
 
 1197        bool                                            _Set_Selected                   (      CSG_Array &Selection, 
size_t i, CSG_PRQuadTree_Leaf *pLeaf, 
double Distance)     
const;
 
 1198        void                                            _Select_Nearest_Points  (      CSG_Array &Selection, CSG_PRQuadTree_Item *pItem, 
double x, 
double y, 
double &Distance, 
double Radius, 
size_t maxPoints, 
int iQuadrant)  
const;
 
 1199        size_t                                          _Select_Nearest_Points  (      CSG_Array &Selection, 
double x, 
double y, 
size_t maxPoints, 
double Radius, 
int iQuadrant)        
const;
 
 
 1226        CSG_Shape *                                    Get_Match_Shape         (
size_t i)      
const;
 
 
 1276        bool                                            Create                            (
const double **Points, 
size_t nPoints);
 
 1282        virtual size_t                          Get_Nearest_Points      (
double Coordinate[2], 
size_t Count, 
double Radius);
 
 1283        virtual size_t                          Get_Nearest_Points      (
double Coordinate[2], 
size_t Count, 
double Radius, 
CSG_Array_sLong &Indices, 
CSG_Vector &Distances);
 
 1284        virtual size_t                          Get_Nearest_Points      (
double Coordinate[2], 
size_t Count, 
size_t *Indices, 
double *Distances);
 
 1285        virtual bool                            Get_Nearest_Point       (
double Coordinate[2], 
size_t &Index, 
double &Distance);
 
 1286        virtual bool                            Get_Nearest_Point       (
double Coordinate[2], 
size_t &Index);
 
 1287        virtual bool                            Get_Nearest_Value       (
double Coordinate[2], 
double &Value);
 
 1288        virtual CSG_Shape *                    Get_Nearest_Shape       (
double Coordinate[2]);
 
 1290        virtual size_t                          Get_Duplicates          (
double Coordinate[2]);
 
 1292        virtual size_t                          Get_Nearest_Points      (
double x, 
double y, 
size_t Count, 
double Radius);
 
 1293        virtual size_t                          Get_Nearest_Points      (
double x, 
double y, 
size_t Count, 
double Radius, 
CSG_Array_sLong &Indices, 
CSG_Vector &Distances);
 
 1294        virtual size_t                          Get_Nearest_Points      (
double x, 
double y, 
size_t Count, 
size_t *Indices, 
double *Distances);
 
 1295        virtual bool                            Get_Nearest_Point       (
double x, 
double y, 
size_t &Index, 
double &Distance);
 
 1296        virtual bool                            Get_Nearest_Point       (
double x, 
double y, 
size_t &Index);
 
 1297        virtual bool                            Get_Nearest_Value       (
double x, 
double y, 
double &Value);
 
 1298        virtual CSG_Shape *                    Get_Nearest_Shape       (
double x, 
double y);
 
 1300        virtual size_t                          Get_Duplicates          (
double x, 
double y);
 
 
 1317        bool                                            Create                            (
CSG_Shapes *pPoints, 
int Field = -1, 
int zField = -1, 
double zScale = 1.);
 
 1326        bool                                            Create                            (
const double **Points, 
size_t nPoints);
 
 1332        virtual size_t                          Get_Nearest_Points      (
double Coordinate[3], 
size_t Count, 
double Radius);
 
 1334        virtual size_t                          Get_Nearest_Points      (
double Coordinate[3], 
size_t Count, 
size_t *Indices, 
double *Distances);
 
 1335        virtual size_t                          Get_Nearest_Points      (
double Coordinate[3], 
size_t Count, 
double Radius, 
CSG_Array_sLong &Indices, 
CSG_Vector &Distances);
 
 1336        virtual bool                            Get_Nearest_Point       (
double Coordinate[3], 
size_t &Index, 
double &Distance);
 
 1337        virtual bool                            Get_Nearest_Point       (
double Coordinate[3], 
size_t &Index);
 
 1338        virtual bool                            Get_Nearest_Value       (
double Coordinate[3], 
double &Value);
 
 1339        virtual CSG_Shape *                    Get_Nearest_Shape       (
double Coordinate[3]);
 
 1341        virtual size_t                          Get_Duplicates          (
double Coordinate[3]);
 
 1343        virtual size_t                          Get_Nearest_Points      (
double x, 
double y, 
double z, 
size_t Count, 
double Radius);
 
 1344        virtual size_t                          Get_Nearest_Points      (
double x, 
double y, 
double z, 
size_t Count, 
double Radius, 
CSG_Array_sLong &Indices, 
CSG_Vector &Distances);
 
 1345        virtual size_t                          Get_Nearest_Points      (
double x, 
double y, 
double z, 
size_t Count, 
size_t *Indices, 
double *Distances);
 
 1346        virtual bool                            Get_Nearest_Point       (
double x, 
double y, 
double z, 
size_t &Index, 
double &Distance);
 
 1347        virtual bool                            Get_Nearest_Point       (
double x, 
double y, 
double z, 
size_t &Index);
 
 1348        virtual bool                            Get_Nearest_Value       (
double x, 
double y, 
double z, 
double &Value);
 
 1349        virtual CSG_Shape *                    Get_Nearest_Shape       (
double x, 
double y, 
double z);
 
 1351        virtual size_t                          Get_Duplicates          (
double x, 
double y, 
double z);
 
 
 1373        bool                                            Do_Use_All                              (
bool bUpdate);
 
 
 1400        bool                                            Initialize                              (
CSG_Shapes *pPoints, 
int zField = -1);
 
 1401        bool                                            Finalize                                (
void);
 
 1403        sLong                                              Set_Location                    (
double x, 
double y);
 
 1406        sLong                                              Get_Count                              (
void)
  const   {       
return( m_pPoints ? m_pPoints->Get_Count() : m_Search.Get_Match_Count() ); }
 
 1407        bool                                            Get_Point                               (
sLong Index, 
double &x, 
double &y, 
double &z);
 
 1409        bool                                            Get_Points                              (
double x, 
double y, 
CSG_Points_3D &Points);
 
 
 1565        static CSG_String             Type_asWKText                   (DWORD             Type);
 
 1566        static DWORD                    Type_asWKBinary                 (
const CSG_String &Type);
 
 1576        static bool                             _WKT_Write_Point                (
CSG_String &Text, 
CSG_Shape *pShape, 
int iPoint, 
int iPart);
 
 1588        static bool                             _WKB_Write_Point                (
CSG_Bytes &Bytes, 
CSG_Shape *pShape, 
int iPoint, 
int iPart);
 
 
 1608        static bool                             to_WKBinary                             (
CSG_Bytes &Bytes, 
class CSG_Grid *pGrid, 
int SRID = -1);
 
 
#define SAGA_API_DLL_EXPORT
bool Update(bool bForce=false)
CSG_Grid_OGIS_Converter(void)
virtual bool Destroy(void)
bool Create(CSG_Shapes *pPoints, int Field=-1)
virtual double Get_Point_Value(size_t i) const
virtual bool Destroy(void)
virtual double Get_Point_Value(size_t i) const
bool Create(CSG_Shapes *pPoints, int Field=-1, int zField=-1, double zScale=1.)
CSG_Array_sLong m_Indices
virtual double Get_Point_Value(int i) const
size_t Get_Match_Count(void) const
virtual double Get_Point_Value(size_t i) const =0
void _On_Construction(void)
double * Get_Point(size_t i) const
int Get_Point_Count(void) const
class CSG_KDTree_Adaptor * m_pAdaptor
double * Get_Point(int i) const
virtual bool Destroy(void)
double Get_Match_Distance(size_t i) const
size_t Get_Match_Index(size_t i) const
static const char * Get_Version(void)
virtual bool is_Leaf(void) const
double Get_xMax(void) const
double Get_yMin(void) const
const CSG_Rect & Get_Extent(void) const
class CSG_PRQuadTree_Leaf * asLeaf(void) const
double Get_yMax(void) const
double Get_Size(void) const
virtual bool is_Node(void) const
CSG_PRQuadTree_Item(const CSG_Rect &Extent, int Quadrant=-1)
void Set_Extent(const CSG_Rect &Extent, int Quadrant=-1)
virtual bool has_Statistics(void) const
double Get_xMin(void) const
bool Contains(const CSG_Point &p) const
bool Contains(double x, double y) const
virtual ~CSG_PRQuadTree_Item(void)
int Get_Quadrant(double x, double y) const
double Get_xCenter(void) const
double Get_yCenter(void) const
int Get_Quadrant(const TSG_Point &p) const
class CSG_PRQuadTree_Node * asNode(void) const
double Get_Variance(void)
friend class CSG_PRQuadTree_Node
CSG_Simple_Statistics s_z
virtual ~CSG_PRQuadTree_Leaf_List(void)
CSG_PRQuadTree_Leaf_List(const CSG_Rect &Extent, int Quadrant, double x, double y, double z)
virtual bool has_Statistics(void) const
double Get_Value(sLong i)
CSG_PRQuadTree_Leaf(const CSG_Rect &Extent, int Quadrant, double x, double y, double z)
virtual bool is_Leaf(void) const
virtual ~CSG_PRQuadTree_Leaf(void)
const TSG_Point & Get_Point(void) const
friend class CSG_PRQuadTree_Node
CSG_PRQuadTree_Node_Statistics(CSG_PRQuadTree_Leaf *pLeaf)
virtual CSG_Simple_Statistics * Get_Z(void)
virtual ~CSG_PRQuadTree_Node_Statistics(void)
friend class CSG_PRQuadTree_Node
CSG_PRQuadTree_Node_Statistics(const CSG_Rect &Extent, int Quadrant=-1)
friend class CSG_PRQuadTree
virtual bool has_Statistics(void) const
CSG_Simple_Statistics m_z
CSG_Simple_Statistics m_x
virtual CSG_Simple_Statistics * Get_X(void)
virtual CSG_Simple_Statistics * Get_Y(void)
CSG_Simple_Statistics m_y
CSG_PRQuadTree_Item * Get_Child(int Quadrant) const
CSG_PRQuadTree_Item * m_pChildren[4]
virtual CSG_Simple_Statistics * Get_Z(void)
virtual CSG_Simple_Statistics * Get_X(void)
CSG_PRQuadTree_Node(const CSG_Rect &Extent, int Quadrant=-1)
virtual CSG_Simple_Statistics * Get_Y(void)
virtual bool is_Node(void) const
friend class CSG_PRQuadTree
size_t Get_Point_Count(void) const
bool Get_Selected_Point(size_t i, double &x, double &y, double &z) const
size_t Get_Selected_Count(void) const
bool Create(const CSG_Rect &Extent, bool bStatistics=false)
double Get_Selected_Distance(size_t i) const
CSG_PRQuadTree_Node * Get_Root_Pointer(void) const
bool Add_Point(double x, double y, double z)
CSG_PRQuadTree_Leaf * Get_Selected_Leaf(size_t i) const
void Set_Polar_Search(bool bOn)
double Get_Selected_Z(size_t i) const
bool is_Polar(void) const
const CSG_PRQuadTree_Node & Get_Root(void) const
virtual ~CSG_Parameters_Point_Search_KDTree_2D(void)
sLong Get_Count(void) const
CSG_Parameters_Point_Search_KDTree_2D(void)
bool Do_Use_All(void) const
size_t Get_Min_Points(void) const
size_t Get_Max_Points(void) const
virtual ~CSG_Parameters_Point_Search(void)
CSG_Parameters_Point_Search(void)
double Get_Radius(void) const
class CSG_Parameters * m_pParameters
double Get_YCenter(void) const
double Get_XMax(void) const
double Get_XMin(void) const
double Get_YMin(void) const
double Get_XCenter(void) const
double Get_YMax(void) const
virtual bool is_Valid(void) const
CSG_Shape_Line(class CSG_Shapes *pOwner, sLong Index)
friend class CSG_Shape_Line
int Add_Point(double x, double y)
int Ins_Point(double x, double y, int iPoint)
class CSG_Shape_Points * Get_Owner(void)
int Add_Point(const CSG_Point_4D &p)
friend class CSG_Shape_Points
int Add_Point(const CSG_Point_3D &p)
TSG_Point_3D Get_Point_Z(int iPoint, bool bAscending=true) const
double Get_M(int iPoint, bool bAscending=true) const
double Get_Z(int iPoint, bool bAscending=true) const
friend class CSG_Shape_Polygon
const CSG_Rect & Get_Extent(void)
virtual void _Update_Extent(void)
int Ins_Point(const CSG_Point &p, int iPoint)
class CSG_Shape_Points * m_pOwner
TSG_Point Get_Point(int iPoint, bool bAscending=true) const
void Set_Z(double z, int iPoint)
CSG_Shape_Part(class CSG_Shape_Points *pOwner)
int Set_Point(const CSG_Point &p, int iPoint)
void Set_M(double m, int iPoint)
int Get_Count(void) const
virtual void _Invalidate(void)
int Add_Point(const CSG_Point &p)
virtual bool _Alloc_Memory(int nPoints)
TSG_Point_4D Get_Point_ZM(int iPoint, bool bAscending=true) const
CSG_Shape_Point_Z(class CSG_Shapes *pOwner, sLong Index)
virtual double Get_ZMax(void)
virtual double Get_ZMin(void)
virtual void Set_Z(double z, int iPoint=0, int iPart=0)
virtual double Get_Z(int iPoint=0, int iPart=0, bool bAscending=true) const
virtual double Get_MMax(void)
virtual double Get_MMin(void)
CSG_Shape_Point_ZM(class CSG_Shapes *pOwner, sLong Index)
virtual void Set_M(double m, int iPoint=0, int iPart=0)
virtual double Get_M(int iPoint=0, int iPart=0, bool bAscending=true) const
virtual double Get_Distance(TSG_Point Point, int iPart) const
virtual bool On_Assign(CSG_Shape *pShape)
virtual int Add_Point(const CSG_Point_3D &p, int iPart=0)
virtual bool is_Valid(void) const
virtual int Get_Point_Count(void) const
virtual int Set_Point(const CSG_Point &p, int iPoint=0, int iPart=0)
virtual double Get_Distance(TSG_Point Point, TSG_Point &Next, int iPart) const
virtual int Ins_Point(const CSG_Point_4D &p, int iPoint, int iPart=0)
virtual int Set_Point(const CSG_Point_3D &p, int iPoint=0, int iPart=0)
virtual int Add_Point(double x, double y, int iPart=0)
virtual double Get_Distance(TSG_Point Point) const
virtual int Add_Point(const CSG_Point &p, int iPart=0)
virtual int Set_Point(double x, double y, int iPoint=0, int iPart=0)
virtual double Get_Distance(TSG_Point Point, TSG_Point &Next) const
virtual int Get_Point_Count(int iPart) const
virtual int Del_Point(int iPoint, int iPart=0)
virtual TSG_Intersection On_Intersects(CSG_Shape *pShape)
CSG_Shape_Point(class CSG_Shapes *pOwner, sLong Index)
virtual TSG_Point Get_Point(int iPoint=0) const
virtual int Get_Part_Count(void) const
virtual TSG_Point Get_Centroid(void)
virtual int Ins_Point(const CSG_Point_3D &p, int iPoint, int iPart=0)
virtual TSG_Point Get_Point(int iPoint, int iPart, bool bAscending=true) const
virtual int Add_Point(const CSG_Point_4D &p, int iPart=0)
virtual int Ins_Point(const CSG_Point &p, int iPoint, int iPart=0)
virtual int Ins_Point(double x, double y, int iPoint, int iPart=0)
virtual int Set_Point(const CSG_Point_4D &p, int iPoint=0, int iPart=0)
virtual int Add_Point(double x, double y, int iPart=0)
CSG_Shape_Points(class CSG_Shapes *pOwner, sLong Index)
virtual void _Invalidate(void)
virtual void Set_M(double m, int iPoint=0, int iPart=0)
friend class CSG_Shape_Part
virtual TSG_Point Get_Point(int iPoint=0) const
virtual bool Revert_Points(int iPart)
virtual void Set_Z(double z, int iPoint=0, int iPart=0)
virtual double Get_Z(int iPoint=0, int iPart=0, bool bAscending=true) const
CSG_Shape_Part ** m_pParts
virtual TSG_Point Get_Point(int iPoint, int iPart, bool bAscending=true) const
virtual CSG_Shape_Part * Get_Part(int iPart) const
virtual int Ins_Point(const CSG_Point &p, int iPoint, int iPart=0)
virtual int Get_Point_Count(int iPart) const
virtual int Get_Part_Count(void) const
virtual int Get_Point_Count(void) const
virtual double Get_ZMin(void)
virtual bool is_Valid(void) const
virtual int Add_Point(const CSG_Point &p, int iPart=0)
virtual int Ins_Point(double x, double y, int iPoint, int iPart=0)
virtual CSG_Shape_Part * _Get_Part(void)
virtual int Add_Point(const CSG_Point_4D &p, int iPart=0)
virtual double Get_M(int iPoint=0, int iPart=0, bool bAscending=true) const
virtual void Destroy(void)
void _Update_Extent(void)
virtual double Get_ZMax(void)
virtual int Add_Point(const CSG_Point_3D &p, int iPart=0)
virtual double Get_MMin(void)
virtual const CSG_Rect & Get_Extent(void)
virtual int Set_Point(const CSG_Point &p, int iPoint=0, int iPart=0)
virtual double Get_MMax(void)
virtual void _Invalidate(void)
double Get_Perimeter(void)
friend class CSG_Shape_Polygon
bool _is_OnEdge(CSG_Shape_Polygon_Part *pPart, const CSG_Point &P, bool bVertex, double Epsilon)
const TSG_Point & Get_Centroid(void)
void _Add_Edge_Points(CSG_Shape_Polygon_Part *pPart, const CSG_Point &P0, const CSG_Point &P1, CSG_Points &Part, double Epsilon)
CSG_Shape_Polygon_Part(class CSG_Shape_Points *pOwner)
virtual bool is_Valid(void) const
CSG_Shape_Polygon_Part * Get_Polygon_Part(int iPart) const
virtual CSG_Shape_Part * _Get_Part(void)
CSG_Shape_Polygon(class CSG_Shapes *pOwner, sLong Index)
virtual int Get_Point_Count(void) const =0
TSG_Intersection Intersects(CSG_Shape *pShape)
virtual const CSG_Rect & Get_Extent(int iPart)
virtual void Set_M(double m, int iPoint=0, int iPart=0)
virtual int Get_Point_Count(int iPart) const =0
virtual double Get_MMax(void)
virtual TSG_Point_4D Get_Point_ZM(int iPoint=0, int iPart=0, bool bAscending=true) const
virtual int Add_Point(const CSG_Point_4D &p, int iPart=0)=0
class CSG_Shape_Polygon * asPolygon(void) const
virtual bool Revert_Points(int iPart)
virtual bool On_Assign(CSG_Shape *pShape)=0
virtual double Get_Distance(TSG_Point Point) const =0
virtual int Add_Part(class CSG_Shape_Part *pPart, bool bRevert=false)
virtual int Add_Point(const CSG_Point_3D &p, int iPart=0)=0
TSG_Shape_Type Get_Type(void) const
virtual double Get_Distance(TSG_Point Point, TSG_Point &Next, int iPart) const =0
CSG_Shape(class CSG_Shapes *pOwner, sLong Index)
virtual int Add_Point(double x, double y, int iPart=0)=0
virtual double Get_MMin(void)
virtual TSG_Intersection On_Intersects(TSG_Rect Extent)=0
virtual int Get_Part_Count(void) const =0
virtual TSG_Point Get_Point(int iPoint=0) const =0
virtual TSG_Point_3D Get_Point_Z(int iPoint=0, int iPart=0, bool bAscending=true) const
virtual int Set_Point(const CSG_Point &p, int iPoint=0, int iPart=0)=0
virtual CSG_Shape_Part * Get_Part(int iPart) const
class CSG_Shape_Line * asLine(void) const
virtual double Get_ZMax(void)
virtual double Get_Distance(TSG_Point Point, TSG_Point &Next) const =0
virtual void _Invalidate(void)
virtual int Ins_Point(const CSG_Point_3D &p, int iPoint, int iPart=0)=0
virtual int Del_Parts(void)
virtual double Get_ZMin(void)
virtual TSG_Point Get_Point(int iPoint, int iPart, bool bAscending=true) const =0
class CSG_Shape_Point * asPoint(void) const
virtual int Set_Point(double x, double y, int iPoint=0, int iPart=0)=0
virtual int Del_Point(int iPoint, int iPart=0)=0
virtual int Ins_Point(const CSG_Point &p, int iPoint, int iPart=0)=0
class CSG_Shape_Points * asPoints(void) const
virtual const CSG_Rect & Get_Extent(void)=0
virtual double Get_Distance(TSG_Point Point, int iPart) const =0
virtual double Get_Z(int iPoint=0, int iPart=0, bool bAscending=true) const
virtual TSG_Intersection On_Intersects(CSG_Shape *pShape)=0
virtual int Add_Point(const CSG_Point &p, int iPart=0)=0
virtual TSG_Point Get_Centroid(void)=0
virtual void Destroy(void)
virtual int Ins_Point(const CSG_Point_4D &p, int iPoint, int iPart=0)=0
TSG_Vertex_Type Get_Vertex_Type(void) const
virtual int Set_Point(const CSG_Point_3D &p, int iPoint=0, int iPart=0)=0
virtual double Get_M(int iPoint=0, int iPart=0, bool bAscending=true) const
virtual void Set_Z(double z, int iPoint=0, int iPart=0)
virtual int Set_Point(const CSG_Point_4D &p, int iPoint=0, int iPart=0)=0
virtual int Del_Part(int iPart)
virtual int Ins_Point(double x, double y, int iPoint, int iPart=0)=0
CSG_Shapes_OGIS_Converter(void)
virtual bool is_Valid(void) const
virtual bool Save(const wchar_t *File, int Format=0)
virtual const CSG_Rect & Get_Extent(void)
virtual bool Del_Shapes(void)
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 CSG_Table_Record * _Get_New_Record(sLong Index)
bool Create(const CSG_Shapes &Shapes)
virtual bool On_Delete(void)
virtual void _On_Construction(void)
virtual bool Destroy(void)
TSG_Vertex_Type Get_Vertex_Type(void) const
virtual TSG_Shape_Type Get_Type(void) const
virtual bool Save(const char *File, int Format=0)
TSG_Vertex_Type m_Vertex_Type
virtual bool On_Update(void)
virtual bool On_Reload(void)
virtual CSG_Shape * Get_Shape_byIndex(sLong Index) const
virtual CSG_Shape * Get_Shape(sLong Index) const
CSG_Rect m_Extent_Selected
CSG_Table_Value & operator[](int Field) const
CSG_Table_Record(class CSG_Table *pTable, sLong Index)
virtual bool Assign(CSG_Table_Record *pRecord)
sLong Get_Count(void) const
virtual bool Del_Records(void)
friend class CSG_Table_Record
virtual CSG_Table_Record * Get_Record(sLong Index) const
CSG_Table_Record * Get_Record_byIndex(sLong Index) const
@ SG_DATAOBJECT_TYPE_Shapes
double SG_Get_Distance(double ax, double ay, double bx, double by, bool bPolar)
SAGA_API_DLL_EXPORT bool SG_Shape_Get_Offset(CSG_Shape *pSubject, double Size, double dArc, CSG_Shape *pSolution=NULL, TSG_Line_JoinType JoinType=TSG_Line_JoinType::SG_LINE_JOINTYPE_Round, TSG_Line_EndType EndType=TSG_Line_EndType::SG_LINE_ENDTYPE_Round)
SAGA_API_DLL_EXPORT bool SG_Shape_Get_ExclusiveOr(CSG_Shape *pSubject, CSG_Shape_Polygon *pClip, CSG_Shape *pSolution=NULL)
TSG_Polygon_Point_Relation
@ SG_POLYGON_POINT_Vertex
@ SG_POLYGON_POINT_Outside
@ SG_POLYGON_POINT_Interior
SAGA_API_DLL_EXPORT TSG_Shape_File_Format SG_Shapes_Get_File_Format_Default(void)
SAGA_API_DLL_EXPORT bool SG_Shapes_Set_File_Format_Default(int Format)
@ SG_LINE_JOINTYPE_Square
SAGA_API_DLL_EXPORT bool SG_Shape_Get_Intersection(CSG_Shape *pSubject, CSG_Shape_Polygon *pClip, CSG_Shape *pSolution=NULL)
@ SHAPE_FILE_FORMAT_Undefined
@ SHAPE_FILE_FORMAT_GeoPackage
@ SHAPE_FILE_FORMAT_GeoJSON
SAGA_API_DLL_EXPORT CSG_String SG_Get_ShapeType_Name(TSG_Shape_Type Type)
SAGA_API_DLL_EXPORT const char * SG_Clipper_Get_Version(void)
SAGA_API_DLL_EXPORT bool SG_Shape_Get_Union(CSG_Shape *pSubject, CSG_Shape_Polygon *pClip, CSG_Shape *pSolution=NULL)
@ SG_OGIS_TYPE_PolyhedralSurfaceZ
@ SG_OGIS_TYPE_MultiPolygon
@ SG_OGIS_TYPE_GeometryCollectionM
@ SG_OGIS_TYPE_MultiPolygonZM
@ SG_OGIS_TYPE_MultiPoint
@ SG_OGIS_TYPE_MultiPolygonZ
@ SG_OGIS_TYPE_GeometryCollectionZM
@ SG_OGIS_TYPE_LineStringZ
@ SG_OGIS_TYPE_GeometryCollectionZ
@ SG_OGIS_TYPE_MultiLineStringM
@ SG_OGIS_TYPE_TriangleZM
@ SG_OGIS_TYPE_PolyhedralSurfaceM
@ SG_OGIS_TYPE_PolyhedralSurface
@ SG_OGIS_TYPE_LineString
@ SG_OGIS_TYPE_PolyhedralSurfaceZM
@ SG_OGIS_TYPE_LineStringZM
@ SG_OGIS_TYPE_MultiLineStringZ
@ SG_OGIS_TYPE_MultiPointM
@ SG_OGIS_TYPE_MultiPointZM
@ SG_OGIS_TYPE_MultiLineStringZM
@ SG_OGIS_TYPE_MultiPolygonM
@ SG_OGIS_TYPE_MultiPointZ
@ SG_OGIS_TYPE_MultiLineString
@ SG_OGIS_TYPE_LineStringM
@ SG_OGIS_TYPE_GeometryCollection
SAGA_API_DLL_EXPORT CSG_String SG_Shapes_Get_File_Extension_Default(void)
SAGA_API_DLL_EXPORT bool SG_Shape_Get_Difference(CSG_Shape *pSubject, CSG_Shape_Polygon *pClip, CSG_Shape *pSolution=NULL)
SAGA_API_DLL_EXPORT bool SG_Shape_Get_Dissolve(CSG_Shape *pSubject, CSG_Shape *pSolution=NULL)
SAGA_API_DLL_EXPORT CSG_Shapes * SG_Create_Shapes(void)
@ SG_LINE_ENDTYPE_Polygon