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
|
2018-05-26 14:10:30 +10:00
|
|
|
Compound curve geometry type
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
.. 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
|
|
|
|
2018-01-04 15:45:00 +10:00
|
|
|
virtual bool equals( const QgsCurve &other ) const;
|
2015-12-15 22:36:41 +11:00
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual QString geometryType() const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual int dimension() const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QgsCompoundCurve *clone() const /Factory/;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual void clear();
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual bool fromWkb( QgsConstWkbPtr &wkb );
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual bool fromWkt( const QString &wkt );
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QByteArray asWkb() const;
|
|
|
|
|
|
|
|
virtual QString asWkt( int precision = 17 ) const;
|
|
|
|
|
2018-04-02 13:53:29 +10:00
|
|
|
virtual QDomElement asGml2( QDomDocument &doc, int precision = 17, const QString &ns = "gml", QgsAbstractGeometry::AxisOrder axisOrder = QgsAbstractGeometry::AxisOrder::XY ) const;
|
2017-04-27 07:55:22 +02:00
|
|
|
|
2018-04-02 13:53:29 +10:00
|
|
|
virtual QDomElement asGml3( QDomDocument &doc, int precision = 17, const QString &ns = "gml", QgsAbstractGeometry::AxisOrder axisOrder = QgsAbstractGeometry::AxisOrder::XY ) const;
|
2017-04-27 07:55:22 +02:00
|
|
|
|
2017-11-15 14:43:39 +10:00
|
|
|
virtual QString asJson( int precision = 17 ) const;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2019-04-06 18:17:13 +02:00
|
|
|
virtual QJsonObject asJsonObject( int precision ) const;
|
2019-04-05 15:07:17 +02:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
|
|
|
|
virtual double length() const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual QgsPoint startPoint() const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual QgsPoint endPoint() const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual void points( QgsPointSequence &pts /Out/ ) const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual int numPoints() const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual bool isEmpty() const;
|
2017-01-30 22:22:09 +10:00
|
|
|
|
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/;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a new line string geometry corresponding to a segmentized approximation
|
|
|
|
of the curve.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param tolerance: segmentation tolerance
|
|
|
|
:param toleranceType: maximum segmentation angle or maximum difference between approximation and curve*
|
2017-04-27 07:55:22 +02:00
|
|
|
%End
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
virtual QgsCompoundCurve *snappedToGrid( double hSpacing, double vSpacing, double dSpacing = 0, double mSpacing = 0 ) const /Factory/;
|
|
|
|
|
2017-12-03 14:54:53 +10:00
|
|
|
virtual bool removeDuplicateNodes( double epsilon = 4 * DBL_EPSILON, bool useZValues = false );
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
int nCurves() const;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the number of curves in the geometry.
|
2017-04-27 07:55:22 +02:00
|
|
|
%End
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
const QgsCurve *curveAt( int i ) const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the curve at the specified index.
|
2017-04-27 07:55:22 +02:00
|
|
|
%End
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
void addCurve( QgsCurve *c /Transfer/ );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Adds a curve to the geometry (takes ownership)
|
2017-04-27 07:55:22 +02:00
|
|
|
%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
|
2017-12-15 10:36:55 -04:00
|
|
|
Removes a curve from the geometry.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param i: index of curve to remove
|
2017-04-27 07:55:22 +02:00
|
|
|
%End
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
void addVertex( const QgsPoint &pt );
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Adds a vertex to the end of the geometry.
|
2017-04-27 07:55:22 +02:00
|
|
|
%End
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual void draw( QPainter &p ) const;
|
|
|
|
|
2018-05-23 06:19:52 +10:00
|
|
|
virtual void transform( const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform, bool transformZ = false ) throw( QgsCsException );
|
|
|
|
|
2017-11-24 15:34:35 +10:00
|
|
|
virtual void transform( const QTransform &t, double zTranslate = 0.0, double zScale = 1.0, double mTranslate = 0.0, double mScale = 1.0 );
|
2017-04-27 07:55:22 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool insertVertex( QgsVertexId position, const QgsPoint &vertex );
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool moveVertex( QgsVertexId position, const QgsPoint &newPos );
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2016-02-02 19:46:18 +11:00
|
|
|
virtual bool deleteVertex( QgsVertexId position );
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-11-29 10:04:20 +10:00
|
|
|
virtual double closestSegment( const QgsPoint &pt, QgsPoint &segmentPt /Out/, QgsVertexId &vertexAfter /Out/, int *leftOf /Out/ = 0, double epsilon = 4 * DBL_EPSILON ) const;
|
2017-04-27 07:55:22 +02:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool pointAt( int node, QgsPoint &point, QgsVertexId::VertexType &type ) const;
|
2017-04-27 07:55:22 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
virtual double vertexAngle( QgsVertexId vertex ) const;
|
2015-09-04 14:53:06 +02:00
|
|
|
|
2017-11-14 08:02:42 +10:00
|
|
|
virtual double segmentLength( QgsVertexId startVertex ) const;
|
2015-10-14 08:21:54 +11:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QgsCompoundCurve *reversed() const /Factory/;
|
2015-11-18 16:24:27 +11:00
|
|
|
|
2018-08-11 17:12:28 +10:00
|
|
|
virtual QgsPoint *interpolatePoint( double distance ) const /Factory/;
|
|
|
|
|
2018-08-10 15:19:00 +10:00
|
|
|
virtual QgsCompoundCurve *curveSubstring( double startDistance, double endDistance ) const /Factory/;
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-10-14 08:21:54 +11:00
|
|
|
virtual bool addZValue( double zValue = 0 );
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-10-14 08:21:54 +11:00
|
|
|
virtual bool addMValue( double mValue = 0 );
|
2015-12-01 16:33:44 +11:00
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-12-01 16:33:44 +11:00
|
|
|
virtual bool dropZValue();
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-12-01 16:33:44 +11:00
|
|
|
virtual bool dropMValue();
|
|
|
|
|
2018-04-02 13:52:29 +10:00
|
|
|
virtual void swapXy();
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2016-08-21 18:21:01 +02:00
|
|
|
virtual double xAt( int index ) const;
|
2017-04-27 07:55:22 +02:00
|
|
|
|
2016-08-21 18:21:01 +02:00
|
|
|
virtual double yAt( int index ) const;
|
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
|
2018-05-29 16:12:39 +10:00
|
|
|
|
2018-02-09 15:57:19 +10:00
|
|
|
virtual QgsCompoundCurve *createEmptyWithSameType() const /Factory/;
|
|
|
|
|
|
|
|
|
2018-06-19 07:28:49 -04:00
|
|
|
SIP_PYOBJECT __repr__();
|
|
|
|
%MethodCode
|
2018-12-18 09:42:34 +10:00
|
|
|
QString wkt = sipCpp->asWkt();
|
|
|
|
if ( wkt.length() > 1000 )
|
|
|
|
wkt = wkt.left( 1000 ) + QStringLiteral( "..." );
|
|
|
|
QString str = QStringLiteral( "<QgsCompoundCurve: %1>" ).arg( wkt );
|
2018-10-06 15:39:40 +02:00
|
|
|
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
|
2018-06-19 07:28:49 -04:00
|
|
|
%End
|
2018-06-05 08:54:45 -04:00
|
|
|
|
2016-02-21 16:26:45 +11:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual QgsRectangle calculateBoundingBox() const;
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
};
|
2017-04-27 07:55:22 +02:00
|
|
|
|
2017-09-25 14:20:39 +10: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 *
|
|
|
|
************************************************************************/
|