61 return mGeometries.size();
71 sipRes = sipCpp->numGeometries();
89 return mGeometries.value( n );
108 if ( a0 < 0 || a0 >= sipCpp->numGeometries() )
110 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
115 return sipConvertFromType( sipCpp->geometryN( a0 ), sipType_QgsAbstractGeometry, NULL );
125 void clear() override;
127 bool removeDuplicateNodes(
double epsilon = 4 * std::numeric_limits<
double>::epsilon(),
bool useZValues = false ) override;
130 int vertexNumberFromVertexId(
QgsVertexId id ) const override;
160 virtual bool removeGeometry(
int nr );
169 virtual bool removeGeometry(
int nr );
171 const int count = sipCpp->numGeometries();
172 if ( a0 < 0 || a0 >= count )
174 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
179 return PyBool_FromLong( sipCpp->removeGeometry( a0 ) );
186 void transform( const QTransform &t,
double zTranslate = 0.0,
double zScale = 1.0,
double mTranslate = 0.0,
double mScale = 1.0 ) override;
188 void draw( QPainter &p ) const override;
189 QPainterPath asQPainterPath() const override;
192 bool fromWkt( const QString &wkt ) override;
196 QString asWkt(
int precision = 17 ) const override;
200 QString asKml(
int precision = 17 ) const override;
202 QgsBox3D boundingBox3D() const override;
205 int nCoordinates() const override;
213 bool deleteVertex(
QgsVertexId position ) override;
219 bool hasCurvedSegments() const override
SIP_HOLDGIL;
226 QgsAbstractGeometry *segmentize(
double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const override
SIP_FACTORY;
228 double vertexAngle(
QgsVertexId vertex ) const override;
229 double segmentLength(
QgsVertexId startVertex ) const override;
230 int vertexCount(
int part = 0,
int ring = 0 ) const override;
231 int ringCount(
int part = 0 ) const override;
232 int partCount() const override;
234 bool isValid( QString &error
SIP_OUT,
Qgis::GeometryValidityFlags flags =
Qgis::GeometryValidityFlags() ) const override;
236 bool addZValue(
double zValue = 0 ) override;
237 bool addMValue(
double mValue = 0 ) override;
238 bool dropZValue() override;
239 bool dropMValue() override;
240 void swapXy() override;
280 const int count = sipCpp->numGeometries();
281 if ( a0 < -count || a0 >= count )
283 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
288 return sipConvertFromType( sipCpp->geometryN( a0 ), sipType_QgsAbstractGeometry, NULL );
292 return sipConvertFromType( sipCpp->geometryN( count + a0 ), sipType_QgsAbstractGeometry, NULL );
306 void __delitem__(
int index );
308 const int count = sipCpp->numGeometries();
309 if ( a0 >= 0 && a0 < count )
310 sipCpp->removeGeometry( a0 );
311 else if ( a0 < 0 && a0 >= -count )
312 sipCpp->removeGeometry( count + a0 );
315 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
327 sipRes = sipConvertFromNewType( new
QgsGeometryPartIterator( sipCpp ), sipType_QgsGeometryPartIterator, Py_None );
334 int childCount() const override;
345 virtual
bool wktOmitChildType() const;
350 bool fromCollectionWkt( const QString &wkt, const QVector<
QgsAbstractGeometry *> &subtypes, const QString &defaultChildWkbType = QString() );
352 QgsBox3D calculateBoundingBox3D() const override;
353 void clearCache() const override;
358 mutable
bool mHasCachedValidity = false;
359 mutable QString mValidityFailureReason;