70 void clear()
override;
74 bool fromWkt(
const QString &wkt )
override;
Abstract base class for all geometries.
AxisOrder
Axis order for GML generation.
@ XY
X comes before Y (or lon before lat).
Qgis::WkbType wkbType() const
Returns the WKB type of the geometry.
bool moveVertex(QgsVertexId position, const QgsPoint &newPos) override
Moves a vertex within the geometry.
bool operator!=(const QgsAbstractGeometry &other) const override
bool insertVertex(QgsVertexId position, const QgsPoint &vertex) override
Inserts a vertex into the geometry.
bool fromWkt(const QString &wkt) override
Sets the geometry from a WKT string.
bool deleteVertex(QgsVertexId position) override
Deletes a vertex within the geometry.
QDomElement asGml3(QDomDocument &doc, int precision=17, const QString &ns="gml", QgsAbstractGeometry::AxisOrder axisOrder=QgsAbstractGeometry::AxisOrder::XY) const override
Returns a GML3 representation of the geometry.
bool operator==(const QgsAbstractGeometry &other) const override
Abstract base class for curved geometry type.
Line string geometry type, with support for z-dimension and m-values.
Point geometry type, with support for z-dimension and m-values.
QgsCurvePolygon * toCurveType() const override
Returns the geometry converted to the more generic curve type QgsCurvePolygon.
void setExteriorRing(QgsCurve *ring) override
Sets the exterior ring of the polygon.
void addInteriorRing(QgsCurve *ring) override
Adds an interior ring to the geometry (takes ownership).
QgsPolygon * clone() const override
Clones the geometry by performing a deep copy.
void clear() override
Clears the geometry, ie reset it to a null geometry.
QString geometryType() const override
Returns a unique string representing the geometry type.
QgsAbstractGeometry * boundary() const override
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the...
friend class QgsCurvePolygon
QgsPolygon()
Constructor for an empty polygon geometry.
QgsPolygon * createEmptyWithSameType() const override
Creates a new geometry with the same class and same WKB type as the original and transfers ownership.
bool fromWkb(QgsConstWkbPtr &wkb) override
Sets the geometry from a WKB string.
QgsPolygon * surfaceToPolygon() const override
Gets a polygon representation of this surface.
QVector< double > angles() const
Returns the three angles of the triangle.
static const QgsTriangle * cast(const QgsAbstractGeometry *geom)
Cast the geom to a QgsTriangle.
QVector< QgsLineString > altitudes() const
An altitude is a segment (defined by a QgsLineString) from a vertex to the opposite side (or,...
QgsCircle inscribedCircle() const
Inscribed circle of the triangle.
QVector< double > lengths() const
Returns the three lengths of the triangle.
QgsPoint circumscribedCenter() const
Center of the circumscribed circle of the triangle.
void setInteriorRings(const QVector< QgsCurve * > &rings)=delete
Inherited method not used.
QgsPoint orthocenter(double lengthTolerance=0.0001) const
An orthocenter is the point of intersection of the altitudes of a triangle.
QgsTriangle medial() const
Medial (or midpoint) triangle of a triangle ABC is the triangle with vertices at the midpoints of the...
bool isEquilateral(double lengthTolerance=0.0001) const
Is the triangle equilateral (three sides with the same length)?
QgsPoint inscribedCenter() const
Center of the inscribed circle of the triangle.
QgsTriangle()
Constructor for an empty triangle geometry.
bool isIsocele(double lengthTolerance=0.0001) const
Is the triangle isocele (two sides with the same length)?
bool isDegenerate() const
Convenient method checking if the geometry is degenerate (have duplicate or colinear point(s)).
bool isScalene(double lengthTolerance=0.0001) const
Is the triangle scalene (all sides have different lengths)?
double circumscribedRadius() const
Radius of the circumscribed circle of the triangle.
static QgsTriangle * cast(QgsAbstractGeometry *geom)
Cast the geom to a QgsTriangle.
QVector< QgsLineString > bisectors(double lengthTolerance=0.0001) const
The segment (defined by a QgsLineString) returned bisect the angle of a vertex to the opposite side.
bool isRight(double angleTolerance=0.0001) const
Is the triangle right-angled?
QgsCircle circumscribedCircle() const
Circumscribed circle of the triangle.
double inscribedRadius() const
Radius of the inscribed circle of the triangle.
QVector< QgsLineString > medians() const
A median is a segment (defined by a QgsLineString) from a vertex to the midpoint of the opposite side...
QgsPoint vertexAt(QgsVertexId id) const override
Returns the point corresponding to a specified vertex id.
static Qgis::WkbType flatType(Qgis::WkbType type)
Returns the flat type for a WKB type.
Utility class for identifying a unique vertex within a geometry.