SAGA API  v9.5
shapes.h File Reference
#include "table.h"

Go to the source code of this file.

Classes

class  CSG_Shape
 
class  CSG_Shape_Point
 
class  CSG_Shape_Point_Z
 
class  CSG_Shape_Point_ZM
 
class  CSG_Shape_Part
 
class  CSG_Shape_Points
 
class  CSG_Shape_Line
 
class  CSG_Shape_Polygon_Part
 
class  CSG_Shape_Polygon
 
class  CSG_Shapes
 
class  CSG_PRQuadTree_Item
 
class  CSG_PRQuadTree_Leaf
 
class  CSG_PRQuadTree_Leaf_List
 
class  CSG_PRQuadTree_Node
 
class  CSG_PRQuadTree_Node_Statistics
 
class  CSG_PRQuadTree
 
class  CSG_KDTree
 
class  CSG_KDTree_2D
 
class  CSG_KDTree_3D
 
class  CSG_Parameters_Point_Search
 
class  CSG_Parameters_Point_Search_KDTree_2D
 
class  CSG_Shapes_OGIS_Converter
 
class  CSG_Grid_OGIS_Converter
 

Enumerations

enum  TSG_Vertex_Type { SG_VERTEX_TYPE_XY = 0, SG_VERTEX_TYPE_XYZ, SG_VERTEX_TYPE_XYZM }
 
enum  TSG_Shape_Type {
  SHAPE_TYPE_Undefined = 0, SHAPE_TYPE_Point, SHAPE_TYPE_Points, SHAPE_TYPE_Line,
  SHAPE_TYPE_Polygon
}
 
enum  TSG_Shape_File_Format { SHAPE_FILE_FORMAT_Undefined = 0, SHAPE_FILE_FORMAT_ESRI, SHAPE_FILE_FORMAT_GeoPackage, SHAPE_FILE_FORMAT_GeoJSON }
 
enum  TSG_ADD_Shape_Copy_Mode { SHAPE_NO_COPY = 0, SHAPE_COPY_GEOM, SHAPE_COPY_ATTR, SHAPE_COPY }
 
enum  TSG_Polygon_Point_Relation { SG_POLYGON_POINT_Outside, SG_POLYGON_POINT_Vertex, SG_POLYGON_POINT_Edge, SG_POLYGON_POINT_Interior }
 
enum  ESG_OGIS_ByteOrder { SG_OGIS_BYTEORDER_XDR = 0, SG_OGIS_BYTEORDER_NDR = 1 }
 
enum  TSG_OGIS_Type_Geometry {
  SG_OGIS_TYPE_Undefined = 0, SG_OGIS_TYPE_Point = 1, SG_OGIS_TYPE_LineString = 2, SG_OGIS_TYPE_Polygon = 3,
  SG_OGIS_TYPE_MultiPoint = 4, SG_OGIS_TYPE_MultiLineString = 5, SG_OGIS_TYPE_MultiPolygon = 6, SG_OGIS_TYPE_GeometryCollection = 7,
  SG_OGIS_TYPE_PolyhedralSurface = 15, SG_OGIS_TYPE_TIN = 16, SG_OGIS_TYPE_Triangle = 17, SG_OGIS_TYPE_PointZ = 1001,
  SG_OGIS_TYPE_LineStringZ = 1002, SG_OGIS_TYPE_PolygonZ = 1003, SG_OGIS_TYPE_MultiPointZ = 1004, SG_OGIS_TYPE_MultiLineStringZ = 1005,
  SG_OGIS_TYPE_MultiPolygonZ = 1006, SG_OGIS_TYPE_GeometryCollectionZ = 1007, SG_OGIS_TYPE_PolyhedralSurfaceZ = 1015, SG_OGIS_TYPE_TINZ = 1016,
  SG_OGIS_TYPE_TriangleZ = 1017, SG_OGIS_TYPE_PointM = 2001, SG_OGIS_TYPE_LineStringM = 2002, SG_OGIS_TYPE_PolygonM = 2003,
  SG_OGIS_TYPE_MultiPointM = 2004, SG_OGIS_TYPE_MultiLineStringM = 2005, SG_OGIS_TYPE_MultiPolygonM = 2006, SG_OGIS_TYPE_GeometryCollectionM = 2007,
  SG_OGIS_TYPE_PolyhedralSurfaceM = 2015, SG_OGIS_TYPE_TINM = 2016, SG_OGIS_TYPE_TriangleM = 2017, SG_OGIS_TYPE_PointZM = 3001,
  SG_OGIS_TYPE_LineStringZM = 3002, SG_OGIS_TYPE_PolygonZM = 3003, SG_OGIS_TYPE_MultiPointZM = 3004, SG_OGIS_TYPE_MultiLineStringZM = 3005,
  SG_OGIS_TYPE_MultiPolygonZM = 3006, SG_OGIS_TYPE_GeometryCollectionZM = 3007, SG_OGIS_TYPE_PolyhedralSurfaceZM = 3015, SG_OGIS_TYPE_TINZM = 3016,
  SG_OGIS_TYPE_TriangleZM = 3017
}
 

Functions

SAGA_API_DLL_EXPORT CSG_String SG_Get_ShapeType_Name (TSG_Shape_Type Type)
 
SAGA_API_DLL_EXPORT CSG_ShapesSG_Create_Shapes (void)
 
SAGA_API_DLL_EXPORT CSG_ShapesSG_Create_Shapes (const CSG_Shapes &Shapes)
 
SAGA_API_DLL_EXPORT CSG_ShapesSG_Create_Shapes (const char *File)
 
SAGA_API_DLL_EXPORT CSG_ShapesSG_Create_Shapes (const wchar_t *File)
 
SAGA_API_DLL_EXPORT CSG_ShapesSG_Create_Shapes (const CSG_String &File)
 
SAGA_API_DLL_EXPORT CSG_ShapesSG_Create_Shapes (TSG_Shape_Type Type, const SG_Char *Name=NULL, CSG_Table *pTemplate=NULL, TSG_Vertex_Type Vertex_Type=SG_VERTEX_TYPE_XY)
 
SAGA_API_DLL_EXPORT CSG_ShapesSG_Create_Shapes (CSG_Shapes *pTemplate)
 
SAGA_API_DLL_EXPORT bool SG_Shapes_Set_File_Format_Default (int Format)
 
SAGA_API_DLL_EXPORT TSG_Shape_File_Format SG_Shapes_Get_File_Format_Default (void)
 
SAGA_API_DLL_EXPORT CSG_String SG_Shapes_Get_File_Extension_Default (void)
 
SAGA_API_DLL_EXPORT bool SG_Shape_Get_Intersection (CSG_Shape *pSubject, CSG_Shape_Polygon *pClip, CSG_Shape *pSolution=NULL)
 
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_ExclusiveOr (CSG_Shape *pSubject, CSG_Shape_Polygon *pClip, CSG_Shape *pSolution=NULL)
 
SAGA_API_DLL_EXPORT bool SG_Shape_Get_Union (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 bool SG_Shape_Get_Offset (CSG_Shape *pSubject, double Size, double dArc, CSG_Shape *pSolution=NULL)
 
SAGA_API_DLL_EXPORT const char * SG_Clipper_Get_Version (void)
 

Detailed Description

The vector data container, a specialized CSG_Table class following a geometry object based approach.

See also
CSG_Shapes
CSG_Table
CSG_Data_Object

Definition in file shapes.h.

Enumeration Type Documentation

◆ ESG_OGIS_ByteOrder

Enumerator
SG_OGIS_BYTEORDER_XDR 
SG_OGIS_BYTEORDER_NDR 

Definition at line 1458 of file shapes.h.

◆ TSG_ADD_Shape_Copy_Mode

Enumerator
SHAPE_NO_COPY 
SHAPE_COPY_GEOM 
SHAPE_COPY_ATTR 
SHAPE_COPY 

Definition at line 123 of file shapes.h.

◆ TSG_OGIS_Type_Geometry

Enumerator
SG_OGIS_TYPE_Undefined 
SG_OGIS_TYPE_Point 
SG_OGIS_TYPE_LineString 
SG_OGIS_TYPE_Polygon 
SG_OGIS_TYPE_MultiPoint 
SG_OGIS_TYPE_MultiLineString 
SG_OGIS_TYPE_MultiPolygon 
SG_OGIS_TYPE_GeometryCollection 
SG_OGIS_TYPE_PolyhedralSurface 
SG_OGIS_TYPE_TIN 
SG_OGIS_TYPE_Triangle 
SG_OGIS_TYPE_PointZ 
SG_OGIS_TYPE_LineStringZ 
SG_OGIS_TYPE_PolygonZ 
SG_OGIS_TYPE_MultiPointZ 
SG_OGIS_TYPE_MultiLineStringZ 
SG_OGIS_TYPE_MultiPolygonZ 
SG_OGIS_TYPE_GeometryCollectionZ 
SG_OGIS_TYPE_PolyhedralSurfaceZ 
SG_OGIS_TYPE_TINZ 
SG_OGIS_TYPE_TriangleZ 
SG_OGIS_TYPE_PointM 
SG_OGIS_TYPE_LineStringM 
SG_OGIS_TYPE_PolygonM 
SG_OGIS_TYPE_MultiPointM 
SG_OGIS_TYPE_MultiLineStringM 
SG_OGIS_TYPE_MultiPolygonM 
SG_OGIS_TYPE_GeometryCollectionM 
SG_OGIS_TYPE_PolyhedralSurfaceM 
SG_OGIS_TYPE_TINM 
SG_OGIS_TYPE_TriangleM 
SG_OGIS_TYPE_PointZM 
SG_OGIS_TYPE_LineStringZM 
SG_OGIS_TYPE_PolygonZM 
SG_OGIS_TYPE_MultiPointZM 
SG_OGIS_TYPE_MultiLineStringZM 
SG_OGIS_TYPE_MultiPolygonZM 
SG_OGIS_TYPE_GeometryCollectionZM 
SG_OGIS_TYPE_PolyhedralSurfaceZM 
SG_OGIS_TYPE_TINZM 
SG_OGIS_TYPE_TriangleZM 

Definition at line 1465 of file shapes.h.

◆ TSG_Polygon_Point_Relation

Enumerator
SG_POLYGON_POINT_Outside 
SG_POLYGON_POINT_Vertex 
SG_POLYGON_POINT_Edge 
SG_POLYGON_POINT_Interior 

Definition at line 636 of file shapes.h.

◆ TSG_Shape_File_Format

Enumerator
SHAPE_FILE_FORMAT_Undefined 
SHAPE_FILE_FORMAT_ESRI 
SHAPE_FILE_FORMAT_GeoPackage 
SHAPE_FILE_FORMAT_GeoJSON 

Definition at line 113 of file shapes.h.

◆ TSG_Shape_Type

Enumerator
SHAPE_TYPE_Undefined 
SHAPE_TYPE_Point 
SHAPE_TYPE_Points 
SHAPE_TYPE_Line 
SHAPE_TYPE_Polygon 

Definition at line 99 of file shapes.h.

◆ TSG_Vertex_Type

Enumerator
SG_VERTEX_TYPE_XY 
SG_VERTEX_TYPE_XYZ 
SG_VERTEX_TYPE_XYZM 

Definition at line 90 of file shapes.h.

Function Documentation

◆ SG_Clipper_Get_Version()

SAGA_API_DLL_EXPORT const char* SG_Clipper_Get_Version ( void  )

Definition at line 407 of file shapes_clipper.cpp.

◆ SG_Create_Shapes() [1/7]

SAGA_API_DLL_EXPORT CSG_Shapes* SG_Create_Shapes ( const char *  File)

Safe shapes construction

Definition at line 107 of file shapes.cpp.

References SG_Create_Shapes().

◆ SG_Create_Shapes() [2/7]

SAGA_API_DLL_EXPORT CSG_Shapes* SG_Create_Shapes ( const CSG_Shapes Shapes)

Safe shapes construction

Definition at line 91 of file shapes.cpp.

References CSG_Shapes::Get_ObjectType(), SG_Create_PointCloud(), SG_DATAOBJECT_TYPE_PointCloud, and SG_DATAOBJECT_TYPE_Shapes.

◆ SG_Create_Shapes() [3/7]

SAGA_API_DLL_EXPORT CSG_Shapes* SG_Create_Shapes ( const CSG_String File)

Safe shapes construction

Definition at line 109 of file shapes.cpp.

References CSG_Shapes::is_Valid().

◆ SG_Create_Shapes() [4/7]

SAGA_API_DLL_EXPORT CSG_Shapes* SG_Create_Shapes ( const wchar_t *  File)

Safe shapes construction

Definition at line 108 of file shapes.cpp.

References SG_Create_Shapes().

◆ SG_Create_Shapes() [5/7]

◆ SG_Create_Shapes() [6/7]

SAGA_API_DLL_EXPORT CSG_Shapes* SG_Create_Shapes ( TSG_Shape_Type  Type,
const SG_Char Name = NULL,
CSG_Table pTemplate = NULL,
TSG_Vertex_Type  Vertex_Type = SG_VERTEX_TYPE_XY 
)

Safe shapes construction

Definition at line 117 of file shapes.cpp.

◆ SG_Create_Shapes() [7/7]

SAGA_API_DLL_EXPORT CSG_Shapes* SG_Create_Shapes ( void  )

Safe shapes construction

Definition at line 85 of file shapes.cpp.

Referenced by SG_Create_Shapes(), and SG_Create_Table().

◆ SG_Get_ShapeType_Name()

SAGA_API_DLL_EXPORT CSG_String SG_Get_ShapeType_Name ( TSG_Shape_Type  Type)

Definition at line 65 of file shapes.cpp.

References _TL, SHAPE_TYPE_Line, SHAPE_TYPE_Point, SHAPE_TYPE_Points, and SHAPE_TYPE_Polygon.

◆ SG_Shape_Get_Difference()

◆ SG_Shape_Get_Dissolve()

SAGA_API_DLL_EXPORT bool SG_Shape_Get_Dissolve ( CSG_Shape pShape,
CSG_Shape pSolution 
)

Assuming supplied shape object is of type polygon and has several parts, it is important that the point order of outer rings (i.e. not lakes) is clockwise, that of lakes counter-clockwise to be processed correctly by the Clipper dissolve function. This is in accordance with the simple features definition but in contrast to ESRI's Shapefile format.

Definition at line 390 of file shapes_clipper.cpp.

References CSG_Shape::Get_Extent().

◆ SG_Shape_Get_ExclusiveOr()

◆ SG_Shape_Get_Intersection()

◆ SG_Shape_Get_Offset()

SAGA_API_DLL_EXPORT bool SG_Shape_Get_Offset ( CSG_Shape pSubject,
double  Size,
double  dArc,
CSG_Shape pSolution = NULL 
)

◆ SG_Shape_Get_Union()

◆ SG_Shapes_Get_File_Extension_Default()

SAGA_API_DLL_EXPORT CSG_String SG_Shapes_Get_File_Extension_Default ( void  )

◆ SG_Shapes_Get_File_Format_Default()

SAGA_API_DLL_EXPORT TSG_Shape_File_Format SG_Shapes_Get_File_Format_Default ( void  )

Definition at line 118 of file shapes_io.cpp.

References gSG_Shape_File_Format_Default.

◆ SG_Shapes_Set_File_Format_Default()

SAGA_API_DLL_EXPORT bool SG_Shapes_Set_File_Format_Default ( int  Format)