QGIS/python/core/geometry/qgscompoundcurve.sip

162 lines
5.0 KiB
Plaintext
Raw Normal View History

2017-04-27 07:55:22 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgscompoundcurve.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsCompoundCurve: QgsCurve
2015-05-15 15:41:56 +02:00
{
2017-04-27 07:55:22 +02:00
%Docstring
Compound curve geometry type
.. versionadded:: 2.10
2015-05-15 15:41:56 +02:00
%End
2017-04-27 07:55:22 +02:00
%TypeHeaderCode
#include "qgscompoundcurve.h"
%End
2015-05-15 15:41:56 +02:00
public:
2016-08-06 11:01:42 +02:00
QgsCompoundCurve();
2017-04-27 07:55:22 +02:00
QgsCompoundCurve( const QgsCompoundCurve &curve );
2016-08-06 11:01:42 +02:00
~QgsCompoundCurve();
2015-05-15 15:41:56 +02:00
2017-04-27 07:55:22 +02:00
virtual bool operator==( const QgsCurve &other ) const;
virtual bool operator!=( const QgsCurve &other ) const;
2015-05-15 15:41:56 +02:00
virtual QString geometryType() const;
virtual int dimension() const;
2017-04-27 07:55:22 +02:00
virtual QgsCompoundCurve *clone() const /Factory/;
2015-05-15 15:41:56 +02:00
virtual void clear();
2017-04-27 07:55:22 +02:00
virtual bool fromWkb( QgsConstWkbPtr &wkb );
virtual bool fromWkt( const QString &wkt );
virtual QByteArray asWkb() const;
virtual QString asWkt( int precision = 17 ) const;
virtual QDomElement asGML2( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;
virtual QDomElement asGML3( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;
virtual QString asJSON( int precision = 17 ) const;
2015-05-15 15:41:56 +02:00
virtual double length() const;
virtual QgsPointV2 startPoint() const;
virtual QgsPointV2 endPoint() const;
2017-04-27 07:55:22 +02:00
virtual void points( QgsPointSequence &pts /Out/ ) const;
2015-05-15 15:41:56 +02:00
virtual int numPoints() const;
2017-04-27 07:55:22 +02:00
virtual bool isEmpty() const;
2016-01-28 10:30:06 +01:00
2017-04-27 07:55:22 +02:00
virtual QgsLineString *curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;
%Docstring
Returns a new line string geometry corresponding to a segmentized approximation
of the curve.
\param tolerance segmentation tolerance
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve*
:rtype: QgsLineString
%End
2015-05-15 15:41:56 +02:00
int nCurves() const;
2017-04-27 07:55:22 +02:00
%Docstring
Returns the number of curves in the geometry.
:rtype: int
%End
2016-01-28 10:30:06 +01:00
2017-04-27 07:55:22 +02:00
const QgsCurve *curveAt( int i ) const;
%Docstring
Returns the curve at the specified index.
:rtype: QgsCurve
%End
2015-05-15 15:41:56 +02:00
2017-04-27 07:55:22 +02:00
void addCurve( QgsCurve *c /Transfer/ );
%Docstring
Adds a curve to the geometr (takes ownership)
%End
2016-01-28 10:30:06 +01:00
2015-05-15 15:41:56 +02:00
void removeCurve( int i );
2017-04-27 07:55:22 +02:00
%Docstring
Removes a curve from the geometry.
\param i index of curve to remove
%End
2016-01-28 10:30:06 +01:00
2017-04-27 07:55:22 +02:00
void addVertex( const QgsPointV2 &pt );
%Docstring
Adds a vertex to the end of the geometry.
%End
2015-05-15 15:41:56 +02:00
2017-04-27 07:55:22 +02:00
virtual void draw( QPainter &p ) const;
virtual void transform( const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform,
bool transformZ = false );
2017-04-27 07:55:22 +02:00
virtual void transform( const QTransform &t );
virtual void addToPainterPath( QPainterPath &path ) const;
2015-05-15 15:41:56 +02:00
2017-04-27 07:55:22 +02:00
virtual void drawAsPolygon( QPainter &p ) const;
virtual bool insertVertex( QgsVertexId position, const QgsPointV2 &vertex );
virtual bool moveVertex( QgsVertexId position, const QgsPointV2 &newPos );
virtual bool deleteVertex( QgsVertexId position );
2015-05-15 15:41:56 +02:00
2017-04-27 07:55:22 +02:00
virtual double closestSegment( const QgsPointV2 &pt, QgsPointV2 &segmentPt /Out/,
QgsVertexId &vertexAfter /Out/, bool *leftOf /Out/,
double epsilon ) const;
virtual bool pointAt( int node, QgsPointV2 &point, QgsVertexId::VertexType &type ) const;
virtual void sumUpArea( double &sum /Out/ ) const;
2015-05-15 15:41:56 +02:00
2015-05-29 17:59:52 +02:00
2016-01-28 10:30:06 +01:00
void close();
2017-04-27 07:55:22 +02:00
%Docstring
Appends first point if not already closed.
%End
virtual bool hasCurvedSegments() const;
2016-01-28 10:30:06 +01:00
2017-04-27 07:55:22 +02:00
virtual double vertexAngle( QgsVertexId vertex ) const;
2017-04-27 07:55:22 +02:00
%Docstring
Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
\param vertex the vertex id
:return: rotation in radians, clockwise from north*
:rtype: float
%End
2017-04-27 07:55:22 +02:00
virtual QgsCompoundCurve *reversed() const /Factory/;
virtual bool addZValue( double zValue = 0 );
virtual bool addMValue( double mValue = 0 );
virtual bool dropZValue();
virtual bool dropMValue();
virtual double xAt( int index ) const;
2017-04-27 07:55:22 +02:00
virtual double yAt( int index ) const;
2017-04-27 07:55:22 +02:00
protected:
virtual QgsRectangle calculateBoundingBox() const;
2015-05-15 15:41:56 +02:00
};
2017-04-27 07:55:22 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgscompoundcurve.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/