QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
21 #include "qgis_core.h"
49 void clear()
override;
51 QByteArray
asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() )
const override;
71 double pointDistanceToBoundary(
double x,
double y )
const;
91 return static_cast<const QgsPolygon *
>( geom );
99 SIP_PYOBJECT __repr__();
101 QString wkt = sipCpp->asWkt();
102 if ( wkt.length() > 1000 )
103 wkt = wkt.left( 1000 ) + QStringLiteral(
"..." );
104 QString str = QStringLiteral(
"<QgsPolygon: %1>" ).arg( wkt );
105 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
114 #endif // QGSPOLYGON_H
Abstract base class for curved geometry type.
QgsWkbTypes::Type wkbType() const
Returns the WKB type of the geometry.
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.
Curve polygon geometry type.
QgsCurvePolygon * clone() const override
Clones the geometry by performing a deep copy.
Type
The WKB type describes the number of dimensions a geometry has.
Line string geometry type, with support for z-dimension and m-values.
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)
const QgsPolygon * cast(const QgsAbstractGeometry *geom) const
Cast the geom to a QgsPolygonV2.
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...
QString geometryType() const override
Returns a unique string representing the geometry type.
QgsPolygon * surfaceToPolygon() const override
Gets a polygon representation of this surface.
static Type flatType(Type type)
Returns the flat type for a WKB type.
QByteArray asWkb(QgsAbstractGeometry::WkbFlags flags=QgsAbstractGeometry::WkbFlags()) const override