QGIS/python/core/geometry/qgsgeometrycollection.sip

201 lines
5.7 KiB
Plaintext
Raw Normal View History

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-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;
2015-05-15 15:41:56 +02:00
virtual QString geometryType() const;
2015-05-15 15:41:56 +02:00
virtual void clear();
2017-04-27 07:55:22 +02:00
virtual QgsAbstractGeometry *boundary() const /Factory/;
2015-05-15 15:41:56 +02: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
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-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
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-04-27 07:55:22 +02:00
virtual void draw( QPainter &p ) const;
2016-01-28 10:30:06 +01:00
2017-04-27 07:55:22 +02:00
virtual bool fromWkb( QgsConstWkbPtr &wkb );
virtual bool fromWkt( const QString &wkt );
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
virtual QgsRectangle boundingBox() const;
2015-05-15 15:41:56 +02:00
2017-04-27 07:55:22 +02:00
virtual QgsCoordinateSequence coordinateSequence() const;
virtual int nCoordinates() const;
2015-05-15 15:41:56 +02:00
virtual double closestSegment( const QgsPoint &pt, QgsPoint &segmentPt /Out/, QgsVertexId &vertexAfter /Out/, bool *leftOf /Out/ = 0, double epsilon = 4 * DBL_EPSILON ) const;
virtual bool nextVertex( QgsVertexId &id, QgsPoint &vertex /Out/ ) const;
2017-04-27 07:55:22 +02:00
virtual bool insertVertex( QgsVertexId position, const QgsPoint &vertex );
virtual bool moveVertex( QgsVertexId position, const QgsPoint &newPos );
virtual bool deleteVertex( QgsVertexId position );
2015-05-15 15:41:56 +02:00
2015-05-15 15:41:56 +02:00
virtual double length() const;
2015-05-15 15:41:56 +02:00
virtual double area() const;
virtual double perimeter() const;
2015-05-29 17:59:52 +02:00
2017-04-27 07:55:22 +02:00
virtual bool hasCurvedSegments() const;
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
2016-01-28 10:30:06 +01:00
virtual int vertexCount( int part = 0, int ring = 0 ) const;
2016-01-28 10:30:06 +01:00
virtual int ringCount( int part = 0 ) const;
virtual int partCount() const;
virtual QgsPoint vertexAt( QgsVertexId id ) const;
virtual bool addZValue( double zValue = 0 );
virtual bool addMValue( double mValue = 0 );
virtual bool dropZValue();
virtual bool dropMValue();
virtual QgsGeometryCollection *toCurveType() const /Factory/;
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
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
virtual QgsRectangle calculateBoundingBox() const;
virtual void clearCache() const;
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 *
************************************************************************/