2017-04-27 07:55:22 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/geometry/qgsgeometrycollection.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsGeometryCollection: QgsAbstractGeometry
|
2015-05-15 15:41:56 +02:00
|
|
|
{
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Geometry collection
|
|
|
|
.. versionadded:: 2.10
|
2015-05-15 15:41:56 +02:00
|
|
|
%End
|
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsgeometrycollection.h"
|
|
|
|
%End
|
2015-05-15 15:41:56 +02:00
|
|
|
public:
|
2016-08-06 11:01:42 +02:00
|
|
|
QgsGeometryCollection();
|
2017-04-27 07:55:22 +02:00
|
|
|
QgsGeometryCollection( const QgsGeometryCollection &c );
|
2016-08-06 11:01:42 +02:00
|
|
|
virtual ~QgsGeometryCollection();
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QgsGeometryCollection *clone() const /Factory/;
|
2015-09-09 17:45:31 +02:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
int numGeometries() const;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the number of geometries within the collection.
|
|
|
|
:rtype: int
|
|
|
|
%End
|
2016-01-28 10:30:06 +01:00
|
|
|
|
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
QgsAbstractGeometry *geometryN( int n );
|
|
|
|
%Docstring
|
|
|
|
Returns a geometry from within the collection.
|
|
|
|
\param n index of geometry to return
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual bool isEmpty() const;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
|
|
|
virtual int dimension() const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual QString geometryType() const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual void clear();
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QgsAbstractGeometry *boundary() const /Factory/;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual bool addGeometry( QgsAbstractGeometry *g /Transfer/ );
|
|
|
|
%Docstring
|
|
|
|
Adds a geometry and takes ownership. Returns true in case of success.
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2015-09-09 16:11:09 +10:00
|
|
|
|
2017-09-25 21:19:43 +10:00
|
|
|
virtual bool insertGeometry( QgsAbstractGeometry *g /Transfer/, int index );
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Inserts a geometry before a specified index and takes ownership. Returns true in case of success.
|
|
|
|
\param g geometry to insert. Ownership is transferred to the collection.
|
|
|
|
\param index position to insert geometry before
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2015-09-09 16:11:09 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual bool removeGeometry( int nr );
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Removes a geometry from the collection.
|
|
|
|
\param nr index of geometry to remove
|
|
|
|
:return: true if removal was successful.
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
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 );
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual void draw( QPainter &p ) const;
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual bool fromWkb( QgsConstWkbPtr &wkb );
|
|
|
|
|
|
|
|
virtual bool fromWkt( const QString &wkt );
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
2016-02-21 16:26:45 +11:00
|
|
|
virtual QgsRectangle boundingBox() const;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QgsCoordinateSequence coordinateSequence() const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2016-10-26 17:14:51 +10:00
|
|
|
virtual int nCoordinates() const;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-09-19 14:08:36 +10:00
|
|
|
virtual double closestSegment( const QgsPoint &pt, QgsPoint &segmentPt /Out/, QgsVertexId &vertexAfter /Out/, bool *leftOf /Out/ = 0, double epsilon = 4 * DBL_EPSILON ) const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool nextVertex( QgsVertexId &id, QgsPoint &vertex /Out/ ) const;
|
2017-04-27 07:55:22 +02:00
|
|
|
|
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool insertVertex( QgsVertexId position, const QgsPoint &vertex );
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool moveVertex( QgsVertexId position, const QgsPoint &newPos );
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2016-02-02 19:46:18 +11:00
|
|
|
virtual bool deleteVertex( QgsVertexId position );
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual double length() const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual double area() const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-10-17 15:40:36 +11:00
|
|
|
virtual double perimeter() const;
|
2015-05-29 17:59:52 +02:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual bool hasCurvedSegments() const;
|
2015-09-04 14:53:06 +02:00
|
|
|
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual QgsAbstractGeometry *segmentize( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;
|
|
|
|
|
|
|
|
%Docstring
|
|
|
|
Returns a geometry without curves. Caller takes ownership
|
|
|
|
\param tolerance segmentation tolerance
|
|
|
|
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve*
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual double vertexAngle( QgsVertexId vertex ) const;
|
|
|
|
|
|
|
|
%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
|
2015-09-09 17:45:31 +02:00
|
|
|
|
2016-01-28 10:30:06 +01:00
|
|
|
virtual int vertexCount( int part = 0, int ring = 0 ) const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2016-01-28 10:30:06 +01:00
|
|
|
virtual int ringCount( int part = 0 ) const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-09-09 17:45:31 +02:00
|
|
|
virtual int partCount() const;
|
2017-09-19 14:53:02 +10:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual QgsPoint vertexAt( QgsVertexId id ) const;
|
2015-10-14 08:21:54 +11:00
|
|
|
|
2017-09-19 14:53:02 +10:00
|
|
|
|
2015-10-14 08:21:54 +11:00
|
|
|
virtual bool addZValue( double zValue = 0 );
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-10-14 08:21:54 +11:00
|
|
|
virtual bool addMValue( double mValue = 0 );
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-12-01 16:33:44 +11:00
|
|
|
virtual bool dropZValue();
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2015-12-01 16:33:44 +11:00
|
|
|
virtual bool dropMValue();
|
2015-10-16 07:48:42 +11:00
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
virtual QgsGeometryCollection *toCurveType() const /Factory/;
|
|
|
|
|
|
|
|
|
2017-05-12 10:31:59 +02:00
|
|
|
|
2015-10-16 07:48:42 +11:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool wktOmitChildType() const;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Returns whether child type names are omitted from Wkt representations of the collection
|
|
|
|
.. versionadded:: 2.12
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2015-10-16 07:48:42 +11:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
bool fromCollectionWkt( const QString &wkt, const QList<QgsAbstractGeometry *> &subtypes, const QString &defaultChildWkbType = QString() );
|
|
|
|
%Docstring
|
|
|
|
Reads a collection from a WKT string.
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2016-02-21 16:26:45 +11:00
|
|
|
virtual QgsRectangle calculateBoundingBox() const;
|
2017-09-19 13:53:56 +10:00
|
|
|
|
2016-02-21 16:26:45 +11:00
|
|
|
virtual void clearCache() const;
|
|
|
|
|
2017-09-19 13:53:56 +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/qgsgeometrycollection.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|