File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -26,23 +26,18 @@ class QgsMultiPolygonV2: QgsMultiSurface
26
26
27
27
virtual QgsMultiPolygonV2 *clone() const /Factory/;
28
28
29
-
30
29
virtual bool fromWkt( const QString &wkt );
31
30
32
-
33
31
virtual QDomElement asGML2( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;
34
32
35
33
virtual QDomElement asGML3( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;
36
34
37
35
virtual QString asJSON( int precision = 17 ) const;
38
36
39
-
40
37
virtual bool addGeometry( QgsAbstractGeometry *g /Transfer/ );
41
38
42
- %Docstring
43
- Adds a geometry and takes ownership. Returns true in case of success
44
- :rtype: bool
45
- %End
39
+ virtual bool insertGeometry( QgsAbstractGeometry *g /Transfer/, int index );
40
+
46
41
47
42
virtual QgsMultiSurface *toCurveType() const /Factory/;
48
43
Original file line number Diff line number Diff line change @@ -148,6 +148,17 @@ bool QgsMultiPolygonV2::addGeometry( QgsAbstractGeometry *g )
148
148
return QgsGeometryCollection::addGeometry ( g );
149
149
}
150
150
151
+ bool QgsMultiPolygonV2::insertGeometry ( QgsAbstractGeometry *g, int index )
152
+ {
153
+ if ( !g || !qgsgeometry_cast< QgsPolygonV2 * >( g ) )
154
+ {
155
+ delete g;
156
+ return false ;
157
+ }
158
+
159
+ return QgsMultiSurface::insertGeometry ( g, index );
160
+ }
161
+
151
162
QgsMultiSurface *QgsMultiPolygonV2::toCurveType () const
152
163
{
153
164
QgsMultiSurface *multiSurface = new QgsMultiSurface ();
Original file line number Diff line number Diff line change @@ -32,18 +32,12 @@ class CORE_EXPORT QgsMultiPolygonV2: public QgsMultiSurface
32
32
QString geometryType () const override ;
33
33
void clear () override ;
34
34
QgsMultiPolygonV2 *clone () const override SIP_FACTORY;
35
-
36
35
bool fromWkt ( const QString &wkt ) override ;
37
-
38
- // inherited: int wkbSize() const;
39
- // inherited: unsigned char* asWkb( int& binarySize ) const;
40
- // inherited: QString asWkt( int precision = 17 ) const;
41
36
QDomElement asGML2 ( QDomDocument &doc, int precision = 17 , const QString &ns = " gml" ) const override ;
42
37
QDomElement asGML3 ( QDomDocument &doc, int precision = 17 , const QString &ns = " gml" ) const override ;
43
38
QString asJSON ( int precision = 17 ) const override ;
44
-
45
- // ! Adds a geometry and takes ownership. Returns true in case of success
46
39
bool addGeometry ( QgsAbstractGeometry *g SIP_TRANSFER ) override ;
40
+ bool insertGeometry ( QgsAbstractGeometry *g SIP_TRANSFER, int index ) override ;
47
41
48
42
/* * Returns the geometry converted to the more generic curve type QgsMultiSurface
49
43
\returns the converted geometry. Caller takes ownership*/
You can’t perform that action at this time.
0 commit comments