QGIS/python/core/qgsvectorlayereditutils.sip

203 lines
7.2 KiB
Plaintext
Raw Normal View History

2017-05-23 09:45:57 +02:00
/************************************************************************
* 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
{
2017-05-23 09:45:57 +02:00
%TypeHeaderCode
2017-05-23 09:45:57 +02:00
#include "qgsvectorlayereditutils.h"
%End
public:
QgsVectorLayerEditUtils( QgsVectorLayer *layer );
bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
2017-05-23 09:45:57 +02:00
%Docstring
Insert a new vertex before the given vertex number,
2017-08-14 10:43:37 +02:00
in the given ring, item (first number is index 0), and feature
Not meaningful for Point geometries
2017-05-23 09:45:57 +02:00
:rtype: bool
%End
bool insertVertex( const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex );
2017-05-23 09:45:57 +02:00
%Docstring
2017-08-14 10:43:37 +02:00
Inserts 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
2017-05-23 09:45:57 +02:00
:rtype: bool
%End
2017-01-11 09:51:38 +03:00
bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
2017-05-23 09:45:57 +02:00
%Docstring
Moves the vertex at the given position number,
2017-08-14 10:43:37 +02:00
ring and item (first number is index 0), and feature
to the given coordinates
2017-05-23 09:45:57 +02:00
:rtype: bool
%End
bool moveVertex( const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex ) /PyName=moveVertexV2/;
2017-05-23 09:45:57 +02:00
%Docstring
Moves the vertex at the given position number,
2017-08-14 10:43:37 +02:00
ring and item (first number is index 0), and feature
to the given coordinates
2017-05-23 09:45:57 +02:00
.. note::
available in Python bindings as moveVertexV2
:rtype: bool
%End
2016-02-14 03:50:23 +01:00
QgsVectorLayer::EditResult deleteVertex( QgsFeatureId featureId, int vertex );
2017-05-23 09:45:57 +02:00
%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 QVector<QgsPointXY> &ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = 0 );
2017-05-23 09:45:57 +02:00
%Docstring
Adds a ring to polygon/multipolygon features
2017-08-14 10:35:56 +02:00
\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.
2017-08-14 10:35:56 +02:00
\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
2017-05-23 09:45:57 +02:00
%End
QgsGeometry::OperationResult addRing( QgsCurve *ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = 0 ) /PyName=addCurvedRing/;
2017-05-23 09:45:57 +02:00
%Docstring
Adds a ring to polygon/multipolygon features
2017-08-14 10:35:56 +02:00
\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.
2017-08-14 10:35:56 +02:00
\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
2017-05-23 09:45:57 +02:00
%End
2016-02-14 03:50:23 +01:00
QgsGeometry::OperationResult addPart( const QList<QgsPointXY> &ring, QgsFeatureId featureId );
2017-05-23 09:45:57 +02:00
%Docstring
Adds a new part polygon to a multipart feature
2017-08-14 10:35:56 +02:00
:return:
- QgsGeometry.Success
- QgsGeometry.AddPartSelectedGeometryNotFound
- QgsGeometry.AddPartNotMultiGeometry
- QgsGeometry.InvalidBaseGeometry
- QgsGeometry.InvalidInput
:rtype: QgsGeometry.OperationResult
2017-05-23 09:45:57 +02:00
%End
QgsGeometry::OperationResult addPart( const QgsPointSequence &ring, QgsFeatureId featureId );
2017-05-23 09:45:57 +02:00
%Docstring
Adds a new part polygon to a multipart feature
2017-08-14 10:35:56 +02:00
:return:
- QgsGeometry.Success
- QgsGeometry.AddPartSelectedGeometryNotFound
- QgsGeometry.AddPartNotMultiGeometry
- QgsGeometry.InvalidBaseGeometry
- QgsGeometry.InvalidInput
.. note::
available in python bindings as addPartV2
:rtype: QgsGeometry.OperationResult
2017-05-23 09:45:57 +02:00
%End
QgsGeometry::OperationResult addPart( QgsCurve *ring, QgsFeatureId featureId ) /PyName=addCurvedPart/;
2017-05-23 09:45:57 +02:00
%Docstring
2017-08-14 10:43:37 +02:00
Adds a new part polygon to a multipart feature
2017-08-14 10:35:56 +02:00
:return:
- QgsGeometry.Success
- QgsGeometry.AddPartSelectedGeometryNotFound
- QgsGeometry.AddPartNotMultiGeometry
- QgsGeometry.InvalidBaseGeometry
- QgsGeometry.InvalidInput
.. note::
available in python bindings as addCurvedPart
:rtype: QgsGeometry.OperationResult
2017-05-23 09:45:57 +02:00
%End
2016-02-14 03:50:23 +01:00
int translateFeature( QgsFeatureId featureId, double dx, double dy );
2017-05-23 09:45:57 +02:00
%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 QVector<QgsPointXY> &splitLine, bool topologicalEditing = false );
2017-05-23 09:45:57 +02:00
%Docstring
2017-08-14 10:43:37 +02:00
Splits parts cut by the given line
2017-08-14 10:35:56 +02:00
\param splitLine line that splits the layer feature parts
\param topologicalEditing true if topological editing is enabled
:return:
- QgsGeometry.InvalidBaseGeometry
- QgsGeometry.Success
- QgsGeometry.InvalidInput
- QgsGeometry.NothingHappened if a selection is present but no feature has been split
- QgsGeometry.InvalidBaseGeometry
- QgsGeometry.GeometryEngineError
- QgsGeometry.SplitCannotSplitPoint
:rtype: QgsGeometry.OperationResult
2017-05-23 09:45:57 +02:00
%End
2014-01-27 09:22:24 +01:00
QgsGeometry::OperationResult splitFeatures( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false );
2017-05-23 09:45:57 +02:00
%Docstring
2017-08-14 10:35:56 +02:00
Splits features cut by the given line
\param splitLine line that splits the layer features
\param topologicalEditing true if topological editing is enabled
:return:
0 in case of success,
4 if there is a selection but no feature split
:rtype: QgsGeometry.OperationResult
2017-05-23 09:45:57 +02:00
%End
int addTopologicalPoints( const QgsGeometry &geom );
2017-05-23 09:45:57 +02:00
%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 );
2017-05-23 09:45:57 +02:00
%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
};
2017-05-23 09:45:57 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsvectorlayereditutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/