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
|
2018-05-26 14:10:30 +10:00
|
|
|
Geometry collection
|
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 "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 );
|
2017-12-15 08:57:22 +10:00
|
|
|
~QgsGeometryCollection();
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2018-01-04 15:45:00 +10:00
|
|
|
virtual bool operator==( const QgsAbstractGeometry &other ) const;
|
|
|
|
|
|
|
|
virtual bool operator!=( const QgsAbstractGeometry &other ) const;
|
|
|
|
|
|
|
|
|
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
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the number of geometries within the collection.
|
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
|
|
|
QgsAbstractGeometry *geometryN( int n );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a geometry from within the collection.
|
|
|
|
|
2017-12-15 21:36:08 -04:00
|
|
|
:param n: index of geometry to return
|
2017-04-27 07:55:22 +02:00
|
|
|
%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-10-27 14:29:31 +10:00
|
|
|
|
|
|
|
virtual QgsGeometryCollection *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 QgsAbstractGeometry *boundary() const /Factory/;
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2017-10-13 12:17:30 +10:00
|
|
|
virtual void adjacentVertices( QgsVertexId vertex, QgsVertexId &previousVertex /Out/, QgsVertexId &nextVertex /Out/ ) const;
|
2017-10-22 14:00:32 +10:00
|
|
|
|
2017-10-22 16:41:58 +10:00
|
|
|
virtual int vertexNumberFromVertexId( QgsVertexId id ) const;
|
|
|
|
|
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.
|
|
|
|
%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
|
2017-12-15 10:36:55 -04:00
|
|
|
Inserts a geometry before a specified index and takes ownership. Returns true in case of success.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param g: geometry to insert. Ownership is transferred to the collection.
|
|
|
|
:param index: position to insert geometry before
|
2017-04-27 07:55:22 +02:00
|
|
|
%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
|
2017-12-15 10:36:55 -04:00
|
|
|
Removes a geometry from the collection.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param nr: index of geometry to remove
|
|
|
|
|
|
|
|
:return: true if removal was successful.
|
2017-04-27 07:55:22 +02:00
|
|
|
%End
|
2015-05-15 15:41:56 +02:00
|
|
|
|
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 );
|
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;
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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-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-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
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a geometry without curves. Caller takes ownership
|
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
|
|
|
|
|
|
|
|
virtual double vertexAngle( QgsVertexId vertex ) const;
|
|
|
|
|
2017-11-14 08:02:42 +10:00
|
|
|
virtual double segmentLength( QgsVertexId startVertex ) const;
|
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
|
|
|
|
2018-04-02 13:52:29 +10:00
|
|
|
virtual void swapXy();
|
|
|
|
|
2017-09-19 13:53:56 +10:00
|
|
|
virtual QgsGeometryCollection *toCurveType() const /Factory/;
|
|
|
|
|
|
|
|
|
2017-05-12 10:31:59 +02:00
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
virtual QgsGeometryCollection *createEmptyWithSameType() const /Factory/;
|
|
|
|
|
2018-02-09 15:57:19 +10:00
|
|
|
|
|
|
|
protected:
|
2017-05-07 15:38:42 +08:00
|
|
|
virtual int childCount() const;
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2017-05-07 15:38:42 +08:00
|
|
|
virtual QgsAbstractGeometry *childGeometry( int index ) const;
|
|
|
|
|
2017-10-27 14:29:31 +10:00
|
|
|
|
2015-10-16 07:48:42 +11:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool wktOmitChildType() const;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether child type names are omitted from Wkt representations of the collection
|
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
.. versionadded:: 2.12
|
|
|
|
%End
|
2015-10-16 07:48:42 +11:00
|
|
|
|
2017-11-14 16:07:39 +10:00
|
|
|
bool fromCollectionWkt( const QString &wkt, const QVector<QgsAbstractGeometry *> &subtypes, const QString &defaultChildWkbType = QString() );
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Reads a collection from a WKT string.
|
2017-04-27 07:55:22 +02:00
|
|
|
%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 *
|
|
|
|
************************************************************************/
|