QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
21 #include "qgis_core.h"
54 void clear()
override;
56 int wkbSize( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() )
const override;
57 QByteArray
asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() )
const override;
78 double pointDistanceToBoundary(
double x,
double y )
const;
98 return static_cast<const QgsPolygon *
>( geom );
106 SIP_PYOBJECT __repr__();
108 QString wkt = sipCpp->asWkt();
109 if ( wkt.length() > 1000 )
110 wkt = wkt.left( 1000 ) + QStringLiteral(
"..." );
111 QString
str = QStringLiteral(
"<QgsPolygon: %1>" ).arg( wkt );
112 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
121 #endif // QGSPOLYGON_H
Abstract base class for curved geometry type.
static const QgsPolygon * cast(const QgsAbstractGeometry *geom)
Cast the geom to a QgsPolygonV2.
void clear() override
Clears the geometry, ie reset it to a null geometry.
virtual void setExteriorRing(QgsCurve *ring)
Sets the exterior ring of the polygon.
static Type flatType(Type type) SIP_HOLDGIL
Returns the flat type for a WKB type.
Curve polygon geometry type.
QgsCurvePolygon * clone() const override
Clones the geometry by performing a deep copy.
int wkbSize(QgsAbstractGeometry::WkbFlags flags=QgsAbstractGeometry::WkbFlags()) const override
Returns the length of the QByteArray returned by asWkb()
Type
The WKB type describes the number of dimensions a geometry has.
Line string geometry type, with support for z-dimension and m-values.
QgsWkbTypes::Type wkbType() const SIP_HOLDGIL
Returns the WKB type of the geometry.
bool fromWkb(QgsConstWkbPtr &wkb) override
Sets the geometry from a WKB string.
virtual void addInteriorRing(QgsCurve *ring)
Adds an interior ring to the geometry (takes ownership)
QString geometryType() const override SIP_HOLDGIL
Returns a unique string representing the geometry type.
QgsCurvePolygon * createEmptyWithSameType() const override
Creates a new geometry with the same class and same WKB type as the original and transfers ownership.
Abstract base class for all geometries.
QgsCurvePolygon * toCurveType() const override
Returns the geometry converted to the more generic curve type.
QgsAbstractGeometry * boundary() const override
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the...
QgsPolygon * surfaceToPolygon() const override
Gets a polygon representation of this surface.
QByteArray asWkb(QgsAbstractGeometry::WkbFlags flags=QgsAbstractGeometry::WkbFlags()) const override