Skip to content

Commit

Permalink
more explicit documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir committed Sep 26, 2017
1 parent 45f041d commit c54e202
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 7 additions & 0 deletions python/core/qgsvectordataprovider.sip
Expand Up @@ -391,6 +391,13 @@ class QgsVectorDataProvider : QgsDataProvider
void pushError( const QString& msg );

/** Converts the geometry to the provider type if possible / necessary
* this is the list of possibile modifications:
* - convert compoundcurve to circularstring
* (possible if compoundcurve consists of one circular string)
* - convert to multitype if necessary
* - convert to curved type if necessary
* - convert to linear type from curved type
* - Add or Remove z/m types
@return the converted geometry or nullptr if no conversion was necessary or possible*/
QgsGeometry* convertToProviderType( const QgsGeometry* geom ) const /Factory/;
};
5 changes: 3 additions & 2 deletions python/core/qgsvectorlayereditbuffer.sip
Expand Up @@ -150,8 +150,9 @@ class QgsVectorLayerEditBuffer : QObject
void updateLayerFields();

/** Apply geometry modification basing on provider geometry type.
* Geometry is modified or only if successful conversion is possible.
* In case of conversion a message is sent to the log.
* Geometry is modified only if successful conversion is possible.
* adaptGeometry calls QgsVectorDataProvider::convertToProviderType()
* if necessary and that apply the modifications.
* @param geometry pointer to the geometry that should be adapted to provider
* @return bool true if success.
* True: Input geometry is changed because conversion is applied or
Expand Down
7 changes: 7 additions & 0 deletions src/core/qgsvectordataprovider.h
Expand Up @@ -469,6 +469,13 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
QgsAttrPalIndexNameHash mAttrPalIndexName;

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

Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsvectorlayereditbuffer.h
Expand Up @@ -180,7 +180,8 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject

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

0 comments on commit c54e202

Please sign in to comment.