QGIS/python/core/qgsvectorlayereditutils.sip

164 lines
6.0 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsvectorlayereditutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsVectorLayerEditUtils
{
%TypeHeaderCode
#include "qgsvectorlayereditutils.h"
%End
public:
QgsVectorLayerEditUtils( QgsVectorLayer *layer );
bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
%Docstring
Insert a new vertex before the given vertex number,
in the given ring, item (first number is index 0), and feature
Not meaningful for Point geometries
:rtype: bool
%End
bool insertVertex( const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex );
%Docstring
Insert a new vertex before the given vertex number,
in the given ring, item (first number is index 0), and feature
Not meaningful for Point geometries
:rtype: bool
%End
bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
%Docstring
Moves the vertex at the given position number,
ring and item (first number is index 0), and feature
to the given coordinates
:rtype: bool
%End
bool moveVertex( const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex ) /PyName=moveVertexV2/;
%Docstring
Moves the vertex at the given position number,
ring and item (first number is index 0), and feature
to the given coordinates
.. note::
available in Python bindings as moveVertexV2
:rtype: bool
%End
QgsVectorLayer::EditResult deleteVertex( QgsFeatureId featureId, int vertex );
%Docstring
Deletes a vertex from a feature.
\param featureId ID of feature to remove vertex from
\param vertex index of vertex to delete
.. versionadded:: 2.14
:rtype: QgsVectorLayer.EditResult
%End
QgsGeometry::OperationResult addRing( const QList<QgsPointXY> &ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = 0 );
%Docstring
Adds a ring to polygon/multipolygon features
@param ring ring to add
@param targetFeatureIds if specified, only these features will be the candidates for adding a ring. Otherwise
all intersecting features are tested and the ring is added to the first valid feature.
@param modifiedFeatureId if specified, feature ID for feature that ring was added to will be stored in this parameter
@return OperationResult result code: success or reason of failure
:rtype: QgsGeometry.OperationResult
%End
QgsGeometry::OperationResult addRing( QgsCurve *ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = 0 ) /PyName=addCurvedRing/;
%Docstring
Adds a ring to polygon/multipolygon features
@param ring ring to add
@param targetFeatureIds if specified, only these features will be the candidates for adding a ring. Otherwise
all intersecting features are tested and the ring is added to the first valid feature.
@param modifiedFeatureId if specified, feature ID for feature that ring was added to will be stored in this parameter
@return OperationResult result code: success or reason of failure
.. note::
available in python bindings as addCurvedRing
:rtype: QgsGeometry.OperationResult
%End
QgsGeometry::OperationResult addPart( const QList<QgsPointXY> &ring, QgsFeatureId featureId );
%Docstring
Adds a new part polygon to a multipart feature
@returns QgsGeometry.OperationResult a result code: success or reason of failure
:rtype: QgsGeometry.OperationResult
%End
QgsGeometry::OperationResult addPart( const QgsPointSequence &ring, QgsFeatureId featureId );
%Docstring
Adds a new part polygon to a multipart feature
@returns QgsGeometry.OperationResult a result code: success or reason of failure
.. note::
available in python bindings as addPartV2
:rtype: QgsGeometry.OperationResult
%End
QgsGeometry::OperationResult addPart( QgsCurve *ring, QgsFeatureId featureId ) /PyName=addCurvedPart/;
%Docstring
:rtype: QgsGeometry.OperationResult
%End
int translateFeature( QgsFeatureId featureId, double dx, double dy );
%Docstring
Translates feature by dx, dy
\param featureId id of the feature to translate
\param dx translation of x-coordinate
\param dy translation of y-coordinate
:return: 0 in case of success
:rtype: int
%End
QgsGeometry::OperationResult splitParts( const QList<QgsPointXY> &splitLine, bool topologicalEditing = false );
%Docstring
:rtype: QgsGeometry.OperationResult
%End
QgsGeometry::OperationResult splitFeatures( const QList<QgsPointXY> &splitLine, bool topologicalEditing = false );
%Docstring
:rtype: QgsGeometry.OperationResult
%End
int addTopologicalPoints( const QgsGeometry &geom );
%Docstring
Adds topological points for every vertex of the geometry.
\param geom the geometry where each vertex is added to segments of other features
.. note::
geom is not going to be modified by the function
:return: 0 in case of success
:rtype: int
%End
int addTopologicalPoints( const QgsPointXY &p );
%Docstring
Adds a vertex to segments which intersect point p but don't
already have a vertex there. If a feature already has a vertex at position p,
no additional vertex is inserted. This method is useful for topological
editing.
\param p position of the vertex
:return: 0 in case of success
:rtype: int
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsvectorlayereditutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/