QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
21 #include "qgis_core.h"
25 #include <QPainterPath>
91 virtual
void addToPainterPath( QPainterPath &path ) const = 0;
92 QPainterPath asQPainterPath() const override;
98 virtual
void drawAsPolygon( QPainter &p ) const = 0;
108 virtual
int numPoints() const = 0;
113 Returns the number of points in the curve.
116 sipRes = sipCpp->numPoints();
120 int __bool__()
const;
153 QString asKml(
int precision = 17 ) const override;
162 int vertexCount(
int part = 0,
int ring = 0 ) const override;
163 int ringCount(
int part = 0 ) const override;
164 int partCount() const override;
169 bool isValid( QString &error
SIP_OUT,
int flags = 0 ) const override;
176 virtual
double xAt(
int index ) const = 0;
183 virtual
double yAt(
int index ) const = 0;
188 virtual QPolygonF asQPolygonF() const;
224 double straightDistance2d() const;
235 double sinuosity() const;
251 Orientation orientation()
const;
270 return static_cast<const QgsCurve *
>( geom );
290 bool snapToGridPrivate(
double hSpacing,
double vSpacing,
double dSpacing,
double mSpacing,
291 const QVector<double> &srcX,
const QVector<double> &srcY,
const QVector<double> &srcZ,
const QVector<double> &srcM,
292 QVector<double> &outX, QVector<double> &outY, QVector<double> &outZ, QVector<double> &outM )
const;
299 mutable bool mHasCachedValidity =
false;
300 mutable QString mValidityFailureReason;
Abstract base class for curved geometry type.
virtual QgsCoordinateSequence coordinateSequence() const =0
Retrieves the sequence of geometries, rings and nodes.
virtual bool pointAt(int node, QgsPoint &point, QgsVertexId::VertexType &type) const =0
Returns the point and vertex id of a point within the curve.
QVector< QgsRingSequence > QgsCoordinateSequence
static bool isSingleType(Type type) SIP_HOLDGIL
Returns true if the WKB type is a single type.
virtual void adjacentVertices(QgsVertexId vertex, QgsVertexId &previousVertex, QgsVertexId &nextVertex) const =0
Returns the vertices adjacent to a specified vertex within a geometry.
virtual void clearCache() const
Clears any cached parameters associated with the geometry, e.g., bounding boxes.
virtual QgsPoint startPoint() const =0
Returns the starting point of the curve.
Point geometry type, with support for z-dimension and m-values.
virtual QgsCurve * reversed() const =0
Returns a reversed copy of the curve, where the direction of the curve has been flipped.
Type
The WKB type describes the number of dimensions a geometry has.
SegmentationToleranceType
Segmentation tolerance as maximum angle or maximum difference between approximation and circle.
Line string geometry type, with support for z-dimension and m-values.
virtual void sumUpArea(double &sum) const =0
Sums up the area of the curve by iterating over the vertices (shoelace formula).
A rectangle specified with double values.
QgsCurve()=default
Constructor for QgsCurve.
QgsWkbTypes::Type wkbType() const SIP_HOLDGIL
Returns the WKB type of the geometry.
virtual QgsPoint endPoint() const =0
Returns the end point of the curve.
@ Clockwise
Clockwise orientation.
virtual QgsPoint childPoint(int index) const
Returns point at index (for geometries without child geometries - i.e.
virtual bool equals(const QgsCurve &other) const =0
Checks whether this curve exactly equals another curve.
@ CounterClockwise
Counter-clockwise orientation.
virtual int vertexNumberFromVertexId(QgsVertexId id) const =0
Returns the vertex number corresponding to a vertex id.
Abstract base class for all geometries.
QgsCurve * clone() const override=0
Clones the geometry by performing a deep copy.
const QgsCurve * cast(const QgsAbstractGeometry *geom) const
Cast the geom to a QgsCurve.
QVector< QgsPoint > QgsPointSequence
virtual bool operator!=(const QgsAbstractGeometry &other) const =0
virtual int childCount() const
Returns number of child geometries (for geometries with child geometries) or child points (for geomet...
Utility class for identifying a unique vertex within a geometry.
static GeometryType geometryType(Type type) SIP_HOLDGIL
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a Polyg...
virtual QgsAbstractGeometry * boundary() const =0
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the...
VertexType
Type of vertex.
virtual bool operator==(const QgsAbstractGeometry &other) const =0
Orientation
Curve orientation.
virtual bool nextVertex(QgsVertexId &id, QgsPoint &vertex) const =0
Returns next vertex id and coordinates.