![]() |
SAGA API
v9.7
|
#include <shapes.h>
Public Member Functions | |
virtual bool | is_Valid (void) const |
CSG_Shape_Polygon_Part * | Get_Polygon_Part (int iPart) const |
bool | is_Lake (int iPart) |
bool | is_Clockwise (int iPart) |
double | Get_Perimeter (int iPart) |
double | Get_Perimeter (void) |
double | Get_Area (int iPart) |
double | Get_Area (void) |
TSG_Point | Get_Centroid (int iPart) |
TSG_Point | Get_Centroid (void) |
TSG_Polygon_Point_Relation | Get_Point_Relation (const CSG_Point &p, int iPart) |
TSG_Polygon_Point_Relation | Get_Point_Relation (double x, double y, int iPart) |
TSG_Polygon_Point_Relation | Get_Point_Relation (const CSG_Point &p) |
TSG_Polygon_Point_Relation | Get_Point_Relation (double x, double y) |
bool | is_OnEdge (const CSG_Point &p, int iPart) |
bool | is_OnEdge (double x, double y, int iPart) |
bool | is_OnEdge (const CSG_Point &p) |
bool | is_OnEdge (double x, double y) |
bool | Contains (const CSG_Point &p, int iPart) |
bool | Contains (double x, double y, int iPart) |
bool | Contains (const CSG_Point &p) |
bool | Contains (double x, double y) |
bool | is_Neighbour (CSG_Shape_Polygon *pPolygon, bool bSimpleCheck=true) |
CSG_Lines | Get_Shared_Edges (CSG_Shape_Polygon *pPolygon, bool bVertexCheck, double Epsilon=0.) |
double | Get_Shared_Length (CSG_Shape_Polygon *pPolygon, bool bVertexCheck, double Epsilon=0.) |
virtual double | Get_Distance (TSG_Point Point, TSG_Point &Next, int iPart) const |
![]() | |
virtual void | Destroy (void) |
virtual int | Get_Point_Count (void) const |
virtual int | Get_Point_Count (int iPart) const |
virtual int | Get_Part_Count (void) const |
virtual int | Add_Part (class CSG_Shape_Part *pPart, bool bRevert=false) |
virtual CSG_Shape_Part * | Get_Part (int iPart) const |
virtual int | Del_Part (int iPart) |
virtual int | Del_Parts (void) |
virtual int | Add_Point (double x, double y, int iPart=0) |
virtual int | Add_Point (const CSG_Point &p, int iPart=0) |
virtual int | Add_Point (const CSG_Point_3D &p, int iPart=0) |
virtual int | Add_Point (const CSG_Point_4D &p, int iPart=0) |
virtual int | Ins_Point (double x, double y, int iPoint, int iPart=0) |
virtual int | Ins_Point (const CSG_Point &p, int iPoint, int iPart=0) |
virtual int | Ins_Point (const CSG_Point_3D &p, int iPoint, int iPart=0) |
virtual int | Ins_Point (const CSG_Point_4D &p, int iPoint, int iPart=0) |
virtual int | Set_Point (double x, double y, int iPoint=0, int iPart=0) |
virtual int | Set_Point (const CSG_Point &p, int iPoint=0, int iPart=0) |
virtual int | Set_Point (const CSG_Point_3D &p, int iPoint=0, int iPart=0) |
virtual int | Set_Point (const CSG_Point_4D &p, int iPoint=0, int iPart=0) |
virtual int | Del_Point (int iPoint, int iPart=0) |
virtual TSG_Point | Get_Point (int iPoint=0) const |
virtual TSG_Point | Get_Point (int iPoint, int iPart, bool bAscending=true) const |
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_ZMin (void) |
virtual double | Get_ZMax (void) |
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_MMin (void) |
virtual double | Get_MMax (void) |
virtual const CSG_Rect & | Get_Extent (void) |
virtual double | Get_Distance (TSG_Point Point) const |
virtual double | Get_Distance (TSG_Point Point, int iPart) const |
virtual double | Get_Distance (TSG_Point Point, TSG_Point &Next) const |
virtual bool | Revert_Points (int iPart) |
![]() | |
virtual bool | Assign (CSG_Table_Record *pRecord) |
virtual bool | Assign (CSG_Table_Record *pRecord, bool bAssign_Attributes) |
virtual bool | Assign (CSG_Table_Record *pRecord, TSG_ADD_Shape_Copy_Mode mCopy) |
TSG_Shape_Type | Get_Type (void) const |
TSG_Vertex_Type | Get_Vertex_Type (void) const |
class CSG_Shape_Point * | asPoint (void) const |
class CSG_Shape_Points * | asPoints (void) const |
class CSG_Shape_Line * | asLine (void) const |
class CSG_Shape_Polygon * | asPolygon (void) const |
virtual TSG_Point_3D | Get_Point_Z (int iPoint=0, int iPart=0, bool bAscending=true) const |
virtual TSG_Point_4D | Get_Point_ZM (int iPoint=0, int iPart=0, bool bAscending=true) const |
virtual const CSG_Rect & | Get_Extent (int iPart) |
TSG_Intersection | Intersects (CSG_Shape *pShape) |
TSG_Intersection | Intersects (const TSG_Rect &Extent) |
![]() | |
class CSG_Table * | Get_Table (void) |
sLong | Get_Index (void) const |
bool | Set_Value (int Field, const CSG_String &Value) |
bool | Set_Value (int Field, const char *Value) |
bool | Set_Value (int Field, const wchar_t *Value) |
bool | Set_Value (const CSG_String &Field, const CSG_String &Value) |
bool | Set_Value (const char *Field, const CSG_String &Value) |
bool | Set_Value (const wchar_t *Field, const CSG_String &Value) |
bool | Set_Value (const char *Field, const char *Value) |
bool | Set_Value (const wchar_t *Field, const wchar_t *Value) |
bool | Set_Value (int Field, const CSG_Bytes &Value) |
bool | Set_Value (const CSG_String &Field, const CSG_Bytes &Value) |
bool | Set_Value (const char *Field, const CSG_Bytes &Value) |
bool | Set_Value (const wchar_t *Field, const CSG_Bytes &Value) |
bool | Set_Value (int Field, double Value) |
bool | Set_Value (const CSG_String &Field, double Value) |
bool | Set_Value (const char *Field, double Value) |
bool | Set_Value (const wchar_t *Field, double Value) |
bool | Set_Value (int Field, sLong Value) |
bool | Set_Value (const CSG_String &Field, sLong Value) |
bool | Set_Value (const char *Field, sLong Value) |
bool | Set_Value (const wchar_t *Field, sLong Value) |
bool | Set_Value (int Field, size_t Value) |
bool | Set_Value (const CSG_String &Field, size_t Value) |
bool | Set_Value (const char *Field, size_t Value) |
bool | Set_Value (const wchar_t *Field, size_t Value) |
bool | Set_Value (int Field, DWORD Value) |
bool | Set_Value (const CSG_String &Field, DWORD Value) |
bool | Set_Value (const char *Field, DWORD Value) |
bool | Set_Value (const wchar_t *Field, DWORD Value) |
bool | Set_Value (int Field, long Value) |
bool | Set_Value (const CSG_String &Field, long Value) |
bool | Set_Value (const char *Field, long Value) |
bool | Set_Value (const wchar_t *Field, long Value) |
bool | Set_Value (int Field, int Value) |
bool | Set_Value (const CSG_String &Field, int Value) |
bool | Set_Value (const char *Field, int Value) |
bool | Set_Value (const wchar_t *Field, int Value) |
bool | Add_Value (int Field, double Value) |
bool | Add_Value (const CSG_String &Field, double Value) |
bool | Add_Value (const char *Field, double Value) |
bool | Add_Value (const wchar_t *Field, double Value) |
bool | Mul_Value (int Field, double Value) |
bool | Mul_Value (const CSG_String &Field, double Value) |
bool | Mul_Value (const char *Field, double Value) |
bool | Mul_Value (const wchar_t *Field, double Value) |
bool | Set_NoData (int Field) |
bool | Set_NoData (const CSG_String &Field) |
bool | Set_NoData (const char *Field) |
bool | Set_NoData (const wchar_t *Field) |
bool | is_NoData (int Field) const |
bool | is_NoData (const CSG_String &Field) const |
bool | is_NoData (const char *Field) const |
bool | is_NoData (const wchar_t *Field) const |
const SG_Char * | asString (int Field, int Decimals=-99) const |
const SG_Char * | asString (const CSG_String &Field, int Decimals=-99) const |
const SG_Char * | asString (const char *Field, int Decimals=-99) const |
const SG_Char * | asString (const wchar_t *Field, int Decimals=-99) const |
SG_Char | asChar (int Field) const |
SG_Char | asChar (const CSG_String &Field) const |
SG_Char | asChar (const char *Field) const |
SG_Char | asChar (const wchar_t *Field) const |
short | asShort (int Field) const |
short | asShort (const CSG_String &Field) const |
short | asShort (const char *Field) const |
short | asShort (const wchar_t *Field) const |
int | asInt (int Field) const |
int | asInt (const CSG_String &Field) const |
int | asInt (const char *Field) const |
int | asInt (const wchar_t *Field) const |
sLong | asLong (int Field) const |
sLong | asLong (const CSG_String &Field) const |
sLong | asLong (const char *Field) const |
sLong | asLong (const wchar_t *Field) const |
float | asFloat (int iField) const |
float | asFloat (const CSG_String &Field) const |
float | asFloat (const char *Field) const |
float | asFloat (const wchar_t *Field) const |
double | asDouble (int Field) const |
double | asDouble (const CSG_String &Field) const |
double | asDouble (const char *Field) const |
double | asDouble (const wchar_t *Field) const |
CSG_Table_Value * | Get_Value (int Field) |
CSG_Table_Value & | operator[] (int Field) const |
bool | is_Selected (void) const |
bool | is_Modified (void) const |
Protected Member Functions | |
CSG_Shape_Polygon (class CSG_Shapes *pOwner, sLong Index) | |
virtual | ~CSG_Shape_Polygon (void) |
virtual CSG_Shape_Part * | _Get_Part (void) |
virtual void | _Invalidate (void) |
virtual TSG_Intersection | On_Intersects (CSG_Shape *pShape) |
virtual TSG_Intersection | On_Intersects (TSG_Rect Region) |
![]() | |
CSG_Shape_Points (class CSG_Shapes *pOwner, sLong Index) | |
virtual | ~CSG_Shape_Points (void) |
int | _Add_Part (void) |
void | _Update_Extent (void) |
virtual bool | On_Assign (CSG_Shape *pShape) |
![]() | |
CSG_Shape (class CSG_Shapes *pOwner, sLong Index) | |
virtual | ~CSG_Shape (void) |
![]() | |
CSG_Table_Record (class CSG_Table *pTable, sLong Index) | |
virtual | ~CSG_Table_Record (void) |
void | Set_Selected (bool bOn=true) |
void | Set_Modified (bool bOn=true) |
bool | _Add_Field (int add_Field) |
bool | _Del_Field (int del_Field) |
int | _Get_Field (const CSG_String &Field) const |
Protected Attributes | |
int | m_bUpdate_Lakes |
![]() | |
bool | m_bUpdate |
int | m_nParts |
int | m_nPoints |
double | m_ZMin |
double | m_ZMax |
double | m_MMin |
double | m_MMax |
CSG_Rect | m_Extent |
CSG_Shape_Part ** | m_pParts |
![]() | |
char | m_Flags |
sLong | m_Index |
class CSG_Table_Value ** | m_Values |
class CSG_Table * | m_pTable |
Friends | |
class | CSG_Shapes |
Additional Inherited Members | |
![]() | |
static CSG_Table_Value * | _Create_Value (TSG_Data_Type Type) |
|
protected |
Definition at line 593 of file shape_polygon.cpp.
References m_bUpdate_Lakes.
|
protectedvirtual |
Definition at line 600 of file shape_polygon.cpp.
|
inlineprotectedvirtual |
Reimplemented from CSG_Shape_Points.
|
protectedvirtual |
Reimplemented from CSG_Shape_Points.
Definition at line 609 of file shape_polygon.cpp.
References CSG_Shape_Points::_Invalidate(), BOOL3_NOTSET, Get_Polygon_Part(), CSG_Shape_Polygon_Part::m_bLake, m_bUpdate_Lakes, and CSG_Shape_Points::m_nParts.
bool CSG_Shape_Polygon::Contains | ( | const CSG_Point & | p | ) |
Definition at line 1040 of file shape_polygon.cpp.
References Contains(), SSG_Point::x, and SSG_Point::y.
bool CSG_Shape_Polygon::Contains | ( | const CSG_Point & | p, |
int | iPart | ||
) |
Definition at line 1026 of file shape_polygon.cpp.
References SSG_Point::x, and SSG_Point::y.
Referenced by Contains(), Get_Point_Relation(), is_OnEdge(), and On_Intersects().
bool CSG_Shape_Polygon::Contains | ( | double | x, |
double | y | ||
) |
Definition at line 1046 of file shape_polygon.cpp.
References Contains(), CSG_Shape_Points::Get_Extent(), Get_Polygon_Part(), and CSG_Shape_Points::m_nParts.
bool CSG_Shape_Polygon::Contains | ( | double | x, |
double | y, | ||
int | iPart | ||
) |
Definition at line 1032 of file shape_polygon.cpp.
References CSG_Shape_Polygon_Part::Contains(), and Get_Polygon_Part().
double CSG_Shape_Polygon::Get_Area | ( | int | iPart | ) |
Definition at line 855 of file shape_polygon.cpp.
References CSG_Shape_Polygon_Part::Get_Area(), and Get_Polygon_Part().
double CSG_Shape_Polygon::Get_Area | ( | void | ) |
Definition at line 863 of file shape_polygon.cpp.
References is_Lake(), and CSG_Shape_Points::m_nParts.
Referenced by Get_Centroid().
TSG_Point CSG_Shape_Polygon::Get_Centroid | ( | int | iPart | ) |
Definition at line 876 of file shape_polygon.cpp.
References CSG_Shape_Polygon_Part::Get_Centroid(), and Get_Polygon_Part().
|
virtual |
Reimplemented from CSG_Shape_Points.
Definition at line 889 of file shape_polygon.cpp.
References Get_Area(), is_Lake(), CSG_Shape_Points::m_nParts, SSG_Point::x, and SSG_Point::y.
|
virtual |
Reimplemented from CSG_Shape_Points.
Definition at line 1176 of file shape_polygon.cpp.
References CSG_Shape_Polygon_Part::Get_Distance(), and Get_Polygon_Part().
double CSG_Shape_Polygon::Get_Perimeter | ( | int | iPart | ) |
Definition at line 834 of file shape_polygon.cpp.
References CSG_Shape_Polygon_Part::Get_Perimeter(), and Get_Polygon_Part().
double CSG_Shape_Polygon::Get_Perimeter | ( | void | ) |
Definition at line 842 of file shape_polygon.cpp.
References CSG_Shape_Points::m_nParts.
TSG_Polygon_Point_Relation CSG_Shape_Polygon::Get_Point_Relation | ( | const CSG_Point & | p | ) |
Definition at line 946 of file shape_polygon.cpp.
References Get_Point_Relation(), SSG_Point::x, and SSG_Point::y.
TSG_Polygon_Point_Relation CSG_Shape_Polygon::Get_Point_Relation | ( | const CSG_Point & | p, |
int | iPart | ||
) |
Definition at line 932 of file shape_polygon.cpp.
References SSG_Point::x, and SSG_Point::y.
Referenced by Get_Point_Relation(), is_Lake(), and is_Neighbour().
TSG_Polygon_Point_Relation CSG_Shape_Polygon::Get_Point_Relation | ( | double | x, |
double | y | ||
) |
Definition at line 952 of file shape_polygon.cpp.
References Contains(), CSG_Shape_Points::Get_Extent(), Get_Point_Relation(), Get_Polygon_Part(), CSG_Shape_Points::m_nParts, SG_POLYGON_POINT_Edge, SG_POLYGON_POINT_Interior, SG_POLYGON_POINT_Outside, and SG_POLYGON_POINT_Vertex.
TSG_Polygon_Point_Relation CSG_Shape_Polygon::Get_Point_Relation | ( | double | x, |
double | y, | ||
int | iPart | ||
) |
Definition at line 938 of file shape_polygon.cpp.
References CSG_Shape_Polygon_Part::Get_Point_Relation(), Get_Polygon_Part(), and SG_POLYGON_POINT_Outside.
|
inline |
Definition at line 707 of file shapes.h.
References CSG_Shape_Points::Get_Part().
Referenced by _Invalidate(), Contains(), Get_Area(), Get_Centroid(), Get_Distance(), Get_Perimeter(), Get_Point_Relation(), Get_Shared_Edges(), is_Clockwise(), is_Lake(), and is_OnEdge().
CSG_Lines CSG_Shape_Polygon::Get_Shared_Edges | ( | CSG_Shape_Polygon * | pPolygon, |
bool | bVertexCheck, | ||
double | Epsilon = 0. |
||
) |
Returns all edge segments shared by this polygon and the one provide by the pPolygon argument as CSG_Lines object. If bVertexCheck is true vertices lying on edged segments of the other polygon will be recognized. If not only vertices are taken into respect that are shared by both polygons. Due to precision issues the tolerance factor specified with Epsilon argument should be slightly greater than zero when using the bVertexCheck option.
Definition at line 1138 of file shape_polygon.cpp.
References CSG_Lines::Add(), CSG_Shape_Points::Get_Extent(), CSG_Shape_Points::Get_Part_Count(), Get_Polygon_Part(), CSG_Shape_Polygon_Part::Get_Shared_Edges(), and CSG_Shape::Intersects().
Referenced by Get_Shared_Length().
double CSG_Shape_Polygon::Get_Shared_Length | ( | CSG_Shape_Polygon * | pPolygon, |
bool | bVertexCheck, | ||
double | Epsilon = 0. |
||
) |
This function requests the edges shared by this polygon and the one provided by the pPolygon argument and returns the total length. See Get_Shared_Edges() for more details.
Definition at line 1163 of file shape_polygon.cpp.
References CSG_Lines::Get_Length(), and Get_Shared_Edges().
bool CSG_Shape_Polygon::is_Clockwise | ( | int | iPart | ) |
Definition at line 826 of file shape_polygon.cpp.
References Get_Polygon_Part(), and CSG_Shape_Polygon_Part::is_Clockwise().
Referenced by CSG_Shapes::Make_Clean().
bool CSG_Shape_Polygon::is_Lake | ( | int | iPart | ) |
Definition at line 766 of file shape_polygon.cpp.
References BOOL3_FALSE, BOOL3_NOTSET, BOOL3_TRUE, CSG_Shape_Part::Get_Point(), Get_Point_Relation(), Get_Polygon_Part(), CSG_Shape_Polygon_Part::m_bLake, m_bUpdate_Lakes, CSG_Shape_Points::m_nParts, CSG_Shape_Part::m_nPoints, CSG_Shape_Points::m_pParts, SG_POLYGON_POINT_Edge, SG_POLYGON_POINT_Interior, SG_POLYGON_POINT_Outside, and SG_POLYGON_POINT_Vertex.
Referenced by Get_Area(), Get_Centroid(), and CSG_Shapes::Make_Clean().
bool CSG_Shape_Polygon::is_Neighbour | ( | CSG_Shape_Polygon * | pPolygon, |
bool | bSimpleCheck = true |
||
) |
Returns true if this polygon touches pPolyogon, i.e. the polygons share vertices or have vertices placed on the edge of the other. If bSimpleCheck is true the check is only performed until one shared vertex is found, which is sufficient if it can be expected that the polygons do not overlap.
Definition at line 1081 of file shape_polygon.cpp.
References CSG_Shape_Points::Get_Extent(), CSG_Shape_Points::Get_Point(), CSG_Shape_Points::Get_Point_Count(), Get_Point_Relation(), CSG_Shape::Intersects(), SG_POLYGON_POINT_Edge, SG_POLYGON_POINT_Interior, SG_POLYGON_POINT_Outside, and SG_POLYGON_POINT_Vertex.
bool CSG_Shape_Polygon::is_OnEdge | ( | const CSG_Point & | p | ) |
Definition at line 998 of file shape_polygon.cpp.
References is_OnEdge(), SSG_Point::x, and SSG_Point::y.
bool CSG_Shape_Polygon::is_OnEdge | ( | const CSG_Point & | p, |
int | iPart | ||
) |
Definition at line 984 of file shape_polygon.cpp.
References SSG_Point::x, and SSG_Point::y.
Referenced by is_OnEdge().
bool CSG_Shape_Polygon::is_OnEdge | ( | double | x, |
double | y | ||
) |
Definition at line 1004 of file shape_polygon.cpp.
References Contains(), CSG_Shape_Points::Get_Extent(), Get_Polygon_Part(), is_OnEdge(), and CSG_Shape_Points::m_nParts.
bool CSG_Shape_Polygon::is_OnEdge | ( | double | x, |
double | y, | ||
int | iPart | ||
) |
Definition at line 990 of file shape_polygon.cpp.
References Get_Polygon_Part(), and CSG_Shape_Polygon_Part::is_OnEdge().
|
inlinevirtual |
Reimplemented from CSG_Shape_Points.
Definition at line 704 of file shapes.h.
References CSG_Table::Get_Count().
|
protectedvirtual |
Reimplemented from CSG_Shape_Points.
Definition at line 630 of file shape_polygon.cpp.
References A, B, C, Contains(), CSG_Shape_Points::Get_Part_Count(), CSG_Shape::Get_Part_Count(), CSG_Shape_Points::Get_Point(), CSG_Shape::Get_Point(), CSG_Shape_Points::Get_Point_Count(), CSG_Shape::Get_Point_Count(), CSG_Shape::Get_Type(), INTERSECTION_Contains, INTERSECTION_None, INTERSECTION_Overlaps, SG_Get_Crossing(), SHAPE_TYPE_Line, SHAPE_TYPE_Point, SHAPE_TYPE_Points, and SHAPE_TYPE_Polygon.
|
protectedvirtual |
Reimplemented from CSG_Shape_Points.
Definition at line 718 of file shape_polygon.cpp.
References C, Contains(), CSG_Shape_Part::Get_Count(), CSG_Shape_Part::Get_Extent(), CSG_Shape_Points::Get_Extent(), INTERSECTION_Contained, INTERSECTION_Contains, INTERSECTION_Identical, INTERSECTION_None, INTERSECTION_Overlaps, CSG_Rect::Intersects(), CSG_Shape::Intersects(), CSG_Shape_Points::m_nParts, CSG_Shape_Part::m_nPoints, CSG_Shape_Part::m_Points, CSG_Shape_Points::m_pParts, SG_Get_Crossing_InRegion(), SSG_Rect::xMin, and SSG_Rect::yMin.
|
friend |
|
protected |
Definition at line 752 of file shapes.h.
Referenced by _Invalidate(), CSG_Shape_Polygon(), and is_Lake().