21 #include "qgis_core.h" 38 void clear()
override;
40 QByteArray
asWkb()
const override;
60 double pointDistanceToBoundary(
double x,
double y )
const;
80 return static_cast<const QgsPolygon *
>( geom );
88 SIP_PYOBJECT __repr__();
90 QString wkt = sipCpp->asWkt();
91 if ( wkt.length() > 1000 )
92 wkt = wkt.left( 1000 ) + QStringLiteral(
"..." );
93 QString str = QStringLiteral(
"<QgsPolygon: %1>" ).arg( wkt );
94 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
103 #endif // QGSPOLYGON_H
QByteArray asWkb() const override
Returns a WKB representation of the geometry.
virtual void setExteriorRing(QgsCurve *ring)
Sets the exterior ring of the polygon.
virtual void addInteriorRing(QgsCurve *ring)
Adds an interior ring to the geometry (takes ownership)
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...
Curve polygon geometry type.
void clear() override
Clears the geometry, ie reset it to a null geometry.
bool fromWkb(QgsConstWkbPtr &wkb) override
Sets the geometry from a WKB string.
Type
The WKB type describes the number of dimensions a geometry has.
QgsCurvePolygon * createEmptyWithSameType() const override
Creates a new geometry with the same class and same WKB type as the original and transfers ownership...
QString geometryType() const override
Returns a unique string representing the geometry type.
Abstract base class for curved geometry type.
Abstract base class for all geometries.
QgsWkbTypes::Type wkbType() const
Returns the WKB type of the geometry.
const QgsPolygon * cast(const QgsAbstractGeometry *geom) const
Cast the geom to a QgsPolygonV2.
QgsCurvePolygon * clone() const override
Clones the geometry by performing a deep copy.
QgsPolygon * surfaceToPolygon() const override
Gets a polygon representation of this surface.
static Type flatType(Type type)
Returns the flat type for a WKB type.