Skip to content

Commit c54e202

Browse files
committed
more explicit documentation
1 parent 45f041d commit c54e202

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

python/core/qgsvectordataprovider.sip

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,13 @@ class QgsVectorDataProvider : QgsDataProvider
391391
void pushError( const QString& msg );
392392

393393
/** Converts the geometry to the provider type if possible / necessary
394+
* this is the list of possibile modifications:
395+
* - convert compoundcurve to circularstring
396+
* (possible if compoundcurve consists of one circular string)
397+
* - convert to multitype if necessary
398+
* - convert to curved type if necessary
399+
* - convert to linear type from curved type
400+
* - Add or Remove z/m types
394401
@return the converted geometry or nullptr if no conversion was necessary or possible*/
395402
QgsGeometry* convertToProviderType( const QgsGeometry* geom ) const /Factory/;
396403
};

python/core/qgsvectorlayereditbuffer.sip

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ class QgsVectorLayerEditBuffer : QObject
150150
void updateLayerFields();
151151

152152
/** Apply geometry modification basing on provider geometry type.
153-
* Geometry is modified or only if successful conversion is possible.
154-
* In case of conversion a message is sent to the log.
153+
* Geometry is modified only if successful conversion is possible.
154+
* adaptGeometry calls QgsVectorDataProvider::convertToProviderType()
155+
* if necessary and that apply the modifications.
155156
* @param geometry pointer to the geometry that should be adapted to provider
156157
* @return bool true if success.
157158
* True: Input geometry is changed because conversion is applied or

src/core/qgsvectordataprovider.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,13 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
469469
QgsAttrPalIndexNameHash mAttrPalIndexName;
470470

471471
/** Converts the geometry to the provider type if possible / necessary
472+
* this is the list of possibile modifications:
473+
* - convert compoundcurve to circularstring
474+
* (possible if compoundcurve consists of one circular string)
475+
* - convert to multitype if necessary
476+
* - convert to curved type if necessary
477+
* - convert to linear type from curved type
478+
* - Add or Remove z/m types
472479
@return the converted geometry or nullptr if no conversion was necessary or possible*/
473480
QgsGeometry* convertToProviderType( const QgsGeometry* geom ) const;
474481

src/core/qgsvectorlayereditbuffer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject
180180

181181
/** Apply geometry modification basing on provider geometry type.
182182
* Geometry is modified only if successful conversion is possible.
183-
* In case of conversion a message is sent to the log.
183+
* adaptGeometry calls QgsVectorDataProvider::convertToProviderType()
184+
* if necessary and that apply the modifications.
184185
* @param geometry pointer to the geometry that should be adapted to provider
185186
* @return bool true if success.
186187
* True: Input geometry is changed because conversion is applied or

0 commit comments

Comments
 (0)