QGIS/python/core/auto_generated/geometry/qgssfcgalgeometry.sip.in

563 lines
17 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgssfcgalgeometry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsSfcgalGeometry
{
%Docstring(signature="appended")
Wraps SFCGAL geometry object.
SfcgalGeometry geometry type.
.. versionadded:: 4.0
%End
%TypeHeaderCode
#include "qgssfcgalgeometry.h"
%End
public:
QgsSfcgalGeometry();
%Docstring
Constructor for an empty SFCGAL geometry geometry.
%End
QgsSfcgalGeometry( const QgsAbstractGeometry *qgsGeom, QString *errorMsg = 0 );
%Docstring
Constructor with :py:class:`QgsAbstractGeometry` pointer.
Will not take ownership.
:param errorMsg: Error message returned by SFGCAL
%End
QgsSfcgalGeometry( const QgsAbstractGeometry &qgsGeom, QString *errorMsg = 0 );
%Docstring
Constructor with :py:class:`QgsAbstractGeometry` reference.
:param errorMsg: Error message returned by SFGCAL
%End
QgsSfcgalGeometry( const QgsGeometry &qgsGeom, QString *errorMsg = 0 );
%Docstring
Constructor with :py:class:`QgsGeometry` reference.
:param errorMsg: Error message returned by SFGCAL
%End
QgsSfcgalGeometry( const QString &wkt, QString *errorMsg = 0 );
%Docstring
Constructor from WKT
:param errorMsg: Error message returned by SFGCAL
%End
QgsSfcgalGeometry( const QgsSfcgalGeometry &otherGeom, QString *errorMsg = 0 );
%Docstring
Copy constructor
:param errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsAbstractGeometry> asQgisGeometry( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Returns the geometry converted to a QGIS geometry object. This method is
slow to call, as it always involves re-conversion of the underlying
SFCGAL geometry object.
%End
Qgis::WkbType wkbType( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Returns type of the geometry as a WKB type (point / linestring / polygon
etc.)
:return: - type of the geometry as a WKB type (point / linestring /
polygon etc.)
- errorMsg: Error message returned by SFGCAL
%End
QString geometryType( QString *errorMsg /Out/ = 0 ) const /HoldGIL/;
%Docstring
Returns type of the geometry as a OGC string in CamelCase
:return: - type of the geometry as a OGC string in CamelCase
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> clone() const;
%Docstring
Clones the geometry by performing a deep copy
%End
static std::unique_ptr<QgsSfcgalGeometry> fromWkb( const QgsConstWkbPtr &wkbPtr, QString *errorMsg /Out/ = 0 );
%Docstring
Creates a new geometry from a WKB byte pointer
:param wkbPtr: WKB byte pointer
:return: - new geometry from WKB
- errorMsg: Error message returned by SFGCAL
%End
QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags(), QString *errorMsg /Out/ = 0 ) const;
%Docstring
Export the geometry as WKB
:param flags: argument specifies flags controlling WKB export behavior.
:return: - WKB data
- errorMsg: Error message returned by SFGCAL
%End
static std::unique_ptr<QgsSfcgalGeometry> fromWkt( const QString &wkt, QString *errorMsg /Out/ = 0 );
%Docstring
Creates a new geometry from a WKT string.
:param wkt: WTK string
:return: - new geometry from WKT
- errorMsg: Error message returned by SFGCAL
%End
QString asWkt( int precision = -1, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Export the geometry as WKT
:param precision: Floating point precision for WKT coordinates. Setting
to -1 yields rational number WKT (not decimal) f.e.
"Point(1/3, 1/6, 1/4)". Note that this will produce
WKT which is not compatible with other QGIS methods or
external libraries.
:return: - WKT data
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> boundary( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Returns the closure of the combinatorial boundary of the geometry (ie
the topological boundary of the geometry). For instance, a polygon
geometry will have a boundary consisting of the linestrings for each
ring in the polygon.
:return: - boundary for geometry. May be ``None`` for some geometry
types.
- errorMsg: Error message returned by SFGCAL
%End
bool operator==( const QgsSfcgalGeometry &other ) const;
bool operator!=( const QgsSfcgalGeometry &other ) const;
bool fuzzyEqual( const QgsSfcgalGeometry &other, double epsilon, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Returns true if this == other geometry modulo ``epsilon`` distance
:param other: geometry to perform the operation
:param epsilon: tolerance
:return: - true if this == other geometry modulo ``epsilon`` distance
- errorMsg: Error message returned by SFGCAL
%End
int dimension( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Returns the inherent dimension of the geometry. For example, this is 0
for a point geometry, 1 for a linestring and 2 for a polygon.
:return: - geometry dimension
- errorMsg: Error message returned by SFGCAL
%End
int partCount( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Returns the ``geom`` part count.
- POINT, TRIANGLE, LINESTRING: vertex number
- POLYGON, SOLID, POLYHEDRALSURFACE, TRIANGULATEDSURFACE: ring or patch
or shell number
- MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, MULTISOLID,
GEOMETRYCOLLECTION: number of geom in collection
:return: - geometry part count
- errorMsg: pointer to string to receive the error message if
any
%End
bool addZValue( double zValue = 0, QString *errorMsg /Out/ = 0 );
%Docstring
Adds a z-dimension to the geometry, initialized to a preset value
(existing Z values remains unchanged).
:param zValue: z value to use
:return: - true if success
- errorMsg: pointer to string to receive the error message if
any
%End
bool addMValue( double mValue = 0, QString *errorMsg /Out/ = 0 );
%Docstring
Adds a m-dimension to the geometry, initialized to a preset value
(existing M values remains unchanged).
:param mValue: m value to use
:return: - true if success
- errorMsg: pointer to string to receive the error message if
any
%End
bool dropZValue( QString *errorMsg /Out/ = 0 );
%Docstring
Drops the z coordinate of the geometry
:return: - true if success
- errorMsg: pointer to string to receive the error message if
any
%End
bool dropMValue( QString *errorMsg /Out/ = 0 );
%Docstring
Drops the m coordinate of the geometry
:return: - true if success
- errorMsg: pointer to string to receive the error message if
any
%End
void swapXy( QString *errorMsg /Out/ = 0 );
%Docstring
Swaps the x and y coordinates of the geometry
:return: pointer to string to receive the error message if any
%End
bool isValid( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Checks if ``geom`` is valid.
If the geometry is invalid, ``errorMsg`` will be filled with the
reported geometry error.
:return: - true if valid
- errorMsg: Error message returned by SFGCAL
%End
bool isEmpty( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Checks if ``geom`` is empty.
:return: - true if empty
- errorMsg: Error message returned by SFGCAL
%End
double area( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Computes the area of ``geom``.
:return: - geometry area
- errorMsg: Error message returned by SFGCAL
%End
double length( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Computes the max length of ``geom``.
:return: - geometry length
- errorMsg: Error message returned by SFGCAL
%End
bool isSimple( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Checks this geometry is simple.
.. seealso:: :py:func:`QgsSfcgalEngine.isSimple`
:return: - true if simple
- errorMsg: Error message returned by SFGCAL
%End
QgsPoint centroid( QString *errorMsg ) const;
%Docstring
Calculates the centroid of this geometry.
:param errorMsg: Error message returned by SFGCAL
:return: geometry centroid
%End
std::unique_ptr<QgsSfcgalGeometry> translate( const QgsVector3D &translation, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Translate this geometry by vector ``translation``.
:param translation: translation vector (2D or 3D)
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> scale( const QgsVector3D &scaleFactor, const QgsPoint &center = QgsPoint(), QString *errorMsg /Out/ = 0 ) const;
%Docstring
Scale this geometry by vector ``scaleFactor``.
:param scaleFactor: scale factor vector (2D or 3D)
:param center: optional parameter. If specified, scaling will be
performed relative to this center
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> rotate2D( double angle, const QgsPoint &center, QString *errorMsg /Out/ = 0 ) const;
%Docstring
2D Rotate this geometry around point ``center`` by angle ``angle``
:param angle: rotation angle in radians
:param center: rotation center
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> rotate3D( double angle, const QgsVector3D &axisVector, const QgsPoint &center = QgsPoint(), QString *errorMsg /Out/ = 0 ) const;
%Docstring
3D Rotate this geometry around axis ``axisVector`` by angle ``angle``
:param angle: rotation angle in radians
:param axisVector: rotation axis
:param center: optional parameter. If specified, rotation will be
applied around axis and center point
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
bool intersects( const QgsAbstractGeometry *otherGeom, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Checks if ``otherGeom`` intersects this.
:param otherGeom: geometry to perform the operation
:return: - true if intersection exists
- errorMsg: Error message returned by SFGCAL
%End
bool intersects( const QgsSfcgalGeometry &otherGeom, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Checks if ``otherGeom`` intersects this.
:param otherGeom: geometry to perform the operation
:return: - true if intersection exists
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> intersection( const QgsAbstractGeometry *otherGeom, QString *errorMsg /Out/ = 0, const QgsGeometryParameters &parameters = QgsGeometryParameters() ) const;
%Docstring
Calculate the intersection of this and ``otherGeom``.
:param otherGeom: geometry to perform the operation
:param parameters: can be used to specify parameters which control the
intersection results
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> intersection( const QgsSfcgalGeometry &otherGeom, QString *errorMsg /Out/ = 0, const QgsGeometryParameters &parameters = QgsGeometryParameters() ) const;
%Docstring
Calculate the intersection of this and ``otherGeom``.
:param otherGeom: geometry to perform the operation
:param parameters: can be used to specify parameters which control the
intersection results
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> combine( const QVector<QgsAbstractGeometry *> &geomList, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Calculate the combination of this and ``geomList``.
:param geomList: list of geometries to perform the operation
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> difference( const QgsAbstractGeometry *otherGeom, QString *errorMsg /Out/ = 0, const QgsGeometryParameters &parameters = QgsGeometryParameters() ) const;
%Docstring
Calculate the difference of this and ``otherGeom``.
:param otherGeom: geometry to perform the operation
:param parameters: can be used to specify parameters which control the
difference results
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> difference( const QgsSfcgalGeometry &otherGeom, QString *errorMsg /Out/ = 0, const QgsGeometryParameters &parameters = QgsGeometryParameters() ) const;
%Docstring
Calculate the difference of this and ``otherGeom``.
:param otherGeom: geometry to perform the operation
:param parameters: can be used to specify parameters which control the
difference results
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> triangulate( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Triangulates this geometry using constraint 2D Delaunay Triangulation
(keep Z if defined)
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> convexHull( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Calculate the convex hull (bounding box).
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> envelope( QString *errorMsg /Out/ = 0 ) const;
%Docstring
Calculate the envelope (bounding box).
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
bool covers( const QgsSfcgalGeometry &otherGeom, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Cover test on 2D or 3D geometries Checks if this covers ``otherGeom``. A
3D covers test is conducted when at least one geometry is 3D; otherwise,
a 2D covers test is carried out.
:param otherGeom: second geometry to perform the operation
:return: - true if coverage exists
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> buffer3D( double radius, int segments, Qgis::JoinStyle3D joinStyle3D, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Calculate a 3D buffer where all points are at ``distance`` from the
original geometry. A negative distance shrinks the geometry rather than
expanding it. It is limited to Point and LineString. If the operation
fails, a null pointer is returned.
:param radius: the buffer radius
:param segments: the number of segments to use for approximating curved
:param joinStyle3D: the type of buffer to compute
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> buffer2D( double radius, int segments, Qgis::JoinStyle joinStyle, QString *errorMsg ) const;
%Docstring
Calculate a 2D buffer where all points are at ``distance`` from the
original geometry. A negative distance shrinks the geometry rather than
expanding it. If the operation fails, a null pointer is returned.
:param radius: the buffer radius
:param segments: the number of segments to use for approximating curved
:param joinStyle: the type of buffer to compute. Only round is
supported.
:param errorMsg: Error message returned by SFGCAL
:return: new geometry
%End
std::unique_ptr<QgsSfcgalGeometry> simplify( double tolerance, bool preserveTopology, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Simplifies a geometry using the CGAL algorithm
:param tolerance: The distance (in geometry unit) threshold
:param preserveTopology: Whether to preserve topology during
simplification
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
std::unique_ptr<QgsSfcgalGeometry> extrude( const QgsVector3D &extrusion, QString *errorMsg /Out/ = 0 ) const;
%Docstring
Calculate an extrusion of the original geometry. If the operation fails,
a null pointer is returned.
:param extrusion: extrusion vector (2D or 3D)
:return: - new geometry
- errorMsg: Error message returned by SFGCAL
%End
protected:
void clearCache() const;
%Docstring
Clears any cached parameters associated with the geometry, e.g.,
bounding boxes
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgssfcgalgeometry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/