2018-09-13 16:24:37 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/analysis/vector/qgsgeometrysnappersinglesource.h *
|
|
|
|
* *
|
2024-08-11 07:55:04 +10:00
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
2018-09-13 16:24:37 +02:00
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsGeometrySnapperSingleSource
|
|
|
|
{
|
2021-03-22 21:13:52 +01:00
|
|
|
%Docstring(signature="appended")
|
2018-09-13 16:24:37 +02:00
|
|
|
|
|
|
|
Makes sure that any two vertices of the vector layer are at least at distance given by the threshold value.
|
2021-02-18 16:10:28 +01:00
|
|
|
|
2018-09-13 16:24:37 +02:00
|
|
|
The algorithm moves nearby vertices to one location and adds vertices to segments that are passing around other
|
|
|
|
vertices within the threshold. It does not remove any vertices. Also, it does not modify geometries unless
|
|
|
|
needed (it does not snap coordinates to a grid).
|
|
|
|
|
|
|
|
This algorithm comes handy when doing vector overlay operations such as intersection, union or difference
|
|
|
|
to prevent possible topological errors caused by numerical errors if coordinates are very close to each other.
|
|
|
|
|
|
|
|
After running the algorithm some previously valid geometries may become invalid and therefore it may be useful
|
|
|
|
to run Fix geometries algorithm afterwards.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Originally ported from GRASS implementation of Vect_snap_lines_list()
|
|
|
|
|
|
|
|
.. versionadded:: 3.4
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsgeometrysnappersinglesource.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
static int run( const QgsFeatureSource &source, QgsFeatureSink &sink, double thresh, QgsFeedback *feedback );
|
|
|
|
%Docstring
|
|
|
|
Run the algorithm on given source and output results to the sink, using threshold value in the source's map units.
|
|
|
|
Returns number of modified geometries.
|
|
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/analysis/vector/qgsgeometrysnappersinglesource.h *
|
|
|
|
* *
|
2024-08-11 07:55:04 +10:00
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
2018-09-13 16:24:37 +02:00
|
|
|
************************************************************************/
|