QGIS/python/core/geometry/qgsgeometrycollectionv2.sip

66 lines
2.7 KiB
Plaintext
Raw Normal View History

2015-05-15 15:41:56 +02:00
class QgsGeometryCollectionV2: public QgsAbstractGeometryV2
{
%TypeHeaderCode
#include <qgsgeometrycollectionv2.h>
%End
public:
QgsGeometryCollectionV2();
QgsGeometryCollectionV2( const QgsGeometryCollectionV2& c );
//QgsGeometryCollectionV2& operator=( const QgsGeometryCollectionV2& c );
virtual ~QgsGeometryCollectionV2();
int numGeometries() const;
//const QgsAbstractGeometryV2* geometryN( int n ) const;
QgsAbstractGeometryV2* geometryN( int n );
//methods inherited from QgsAbstractGeometry
virtual int dimension() const;
virtual QString geometryType() const;
virtual void clear();
2015-07-29 11:52:14 +02:00
/** Adds a geometry and takes ownership. Returns true in case of success*/
2015-05-15 15:41:56 +02:00
virtual bool addGeometry( QgsAbstractGeometryV2* g /Transfer/ );
/** Inserts a geometry before a specified index and takes ownership. Returns true in case of success.
* @param index position to insert geometry before
*/
virtual bool insertGeometry( QgsAbstractGeometryV2* g /Transfer/, int index );
2015-05-15 15:41:56 +02:00
virtual bool removeGeometry( int nr );
virtual void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
2015-05-15 15:41:56 +02:00
void transform( const QTransform& t );
//virtual void clip( const QgsRectangle& rect );
2015-05-15 15:41:56 +02:00
virtual void draw( QPainter& p ) const;
bool fromWkb( const unsigned char * wkb );
int wkbSize() const;
unsigned char* asWkb( int& binarySize ) const;
QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QString asJSON( int precision = 17 ) const;
virtual QgsRectangle calculateBoundingBox() const;
virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord /Out/ ) const;
virtual double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const;
bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const;
//low-level editing
virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex );
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos );
virtual bool deleteVertex( const QgsVertexId& position );
virtual double length() const;
virtual double area() const;
2015-05-29 17:59:52 +02:00
bool hasCurvedSegments() const;
/** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
2015-09-04 17:23:41 +02:00
@param vertex the vertex id
@return rotation in radians, clockwise from north*/
double vertexAngle( const QgsVertexId& vertex ) const;
2015-05-15 15:41:56 +02:00
};