2017-04-27 07:55:22 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/geometry/qgscircularstring.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsCircularString: 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
|
|
|
Circular string 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 "qgscircularstring.h"
|
|
|
|
%End
|
2015-05-15 15:41:56 +02:00
|
|
|
public:
|
2018-04-11 07:50:19 +10:00
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
QgsCircularString();
|
2018-04-11 07:50:19 +10:00
|
|
|
%Docstring
|
|
|
|
Constructs an empty circular string.
|
|
|
|
%End
|
|
|
|
|
|
|
|
QgsCircularString( const QgsPoint &p1,
|
|
|
|
const QgsPoint &p2,
|
|
|
|
const QgsPoint &p3 );
|
|
|
|
%Docstring
|
|
|
|
Constructs a circular string with a single
|
|
|
|
arc passing through ``p1``, ``p2`` and ``p3``.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QgsCircularString fromTwoPointsAndCenter( const QgsPoint &p1,
|
|
|
|
const QgsPoint &p2,
|
2018-04-11 08:31:06 +10:00
|
|
|
const QgsPoint ¢er,
|
|
|
|
bool useShortestArc = true );
|
2018-04-11 07:50:19 +10:00
|
|
|
%Docstring
|
|
|
|
Creates a circular string with a single arc representing
|
|
|
|
the curve from ``p1`` to ``p2`` with the specified ``center``.
|
|
|
|
|
2018-04-11 08:31:06 +10:00
|
|
|
If ``useShortestArc`` is true, then the arc returned will be that corresponding
|
|
|
|
to the shorter arc from ``p1`` to ``p2``. If it is false, the longer arc from ``p1``
|
|
|
|
to ``p2`` will be used (i.e. winding the other way around the circle).
|
|
|
|
|
2018-04-11 07:50:19 +10:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
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 QgsCircularString *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 );
|
2015-05-15 15:41:56 +02:00
|
|
|
|
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;
|
2017-04-27 07:55:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
virtual bool isEmpty() const;
|
|
|
|
|
|
|
|
virtual int numPoints() const;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
QgsPoint pointN( int i ) const;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the point at index i within the circular string.
|
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
|
|
|
virtual void points( QgsPointSequence &pts /Out/ ) const;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
void setPoints( const QgsPointSequence &points );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the circular string's points
|
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
|
|
|
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-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
|
|
|
|
|
|
|
virtual QgsCircularString *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-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;
|
2016-01-28 10:30:06 +01: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
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual bool hasCurvedSegments() const;
|
2015-05-29 20:35:42 +02:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual double vertexAngle( QgsVertexId vertex ) const;
|
2015-05-29 20:35:42 +02:00
|
|
|
|
2017-11-14 08:02:42 +10:00
|
|
|
virtual double segmentLength( QgsVertexId startVertex ) const;
|
2015-09-04 14:53:06 +02:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QgsCircularString *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 QgsCircularString *curveSubstring( double startDistance, double endDistance ) const /Factory/;
|
|
|
|
|
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
|
|
|
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();
|
|
|
|
|
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
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
virtual QgsCircularString *createEmptyWithSameType() const /Factory/;
|
2016-02-21 16:26:45 +11:00
|
|
|
|
2018-02-09 15:57:19 +10:00
|
|
|
|
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( "<QgsCircularString: %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
|
|
|
|
2018-02-09 15:57:19 +10:00
|
|
|
protected:
|
|
|
|
|
2016-02-21 16:26:45 +11:00
|
|
|
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/qgscircularstring.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|