mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-17 00:09:36 -04:00
Update and cleanup of geometry_checker dox
This commit is contained in:
parent
f49a69d44c
commit
7717f39d48
@ -28,10 +28,10 @@ A new subclass of :py:class:`QgsGeometryCheck` needs to be written and at least
|
|||||||
abstract methods need to be implemented:
|
abstract methods need to be implemented:
|
||||||
|
|
||||||
- :py:func:`~compatibleGeometryTypes`: A list of geometry types to which this check applies
|
- :py:func:`~compatibleGeometryTypes`: A list of geometry types to which this check applies
|
||||||
- :py:func:`~resolutionMethods`: A list of names for (automated) resolution methods that can be used to fix errors of this type
|
- :py:func:`~availableResolutionMethods`: A list of resolution methods that can be used to fix errors of this type
|
||||||
- :py:func:`~description`: A description for the geometry check.
|
- :py:func:`~description`: A description for the geometry check.
|
||||||
- :py:func:`~id`: A unique id for this check.
|
- :py:func:`~id`: A unique id for this check.
|
||||||
- :py:func:`~checkType`: One of :py:class:`QgsGeometryCheck`.LayerCheck, :py:class:`QgsGeometryCheck`.FeatureCheck,:py:class:`QgsGeometryCheck`.FeatureNodeCheck
|
- :py:func:`~checkType`: One of :py:class:`QgsGeometryCheck`.LayerCheck, :py:class:`QgsGeometryCheck`.FeatureCheck, :py:class:`QgsGeometryCheck`.FeatureNodeCheck
|
||||||
- :py:func:`~collectErrors`: This method will be called to validate geometries. All geometries which should be validated are passed
|
- :py:func:`~collectErrors`: This method will be called to validate geometries. All geometries which should be validated are passed
|
||||||
into this method with the parameter ids and should be retrieved from the available featurePools to make
|
into this method with the parameter ids and should be retrieved from the available featurePools to make
|
||||||
use of caching. New errors should be appended to the error list and other message strings to messages.
|
use of caching. New errors should be appended to the error list and other message strings to messages.
|
||||||
@ -63,7 +63,7 @@ is aware of the available geometry checks.
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# Make sure you always keep a
|
# Make sure you always keep a reference
|
||||||
checkFactory = MyGeometryCheckFactory()
|
checkFactory = MyGeometryCheckFactory()
|
||||||
QgsAnalysis.geometryCheckRegistry().registerGeometryCheck(checkFactory)
|
QgsAnalysis.geometryCheckRegistry().registerGeometryCheck(checkFactory)
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ Create a new geometry check.
|
|||||||
|
|
||||||
virtual void prepare( const QgsGeometryCheckContext *context, const QVariantMap &configuration );
|
virtual void prepare( const QgsGeometryCheckContext *context, const QVariantMap &configuration );
|
||||||
%Docstring
|
%Docstring
|
||||||
Will be run in the main thread before collectErrors is called (which may be run from a background thread).
|
Will be run in the main thread before :py:func:`~collectErrors` is called (which may be run from a background thread).
|
||||||
|
|
||||||
.. versionadded:: 3.10
|
.. versionadded:: 3.10
|
||||||
%End
|
%End
|
||||||
@ -157,7 +157,7 @@ Will be run in the main thread before collectErrors is called (which may be run
|
|||||||
virtual bool isCompatible( QgsVectorLayer *layer ) const;
|
virtual bool isCompatible( QgsVectorLayer *layer ) const;
|
||||||
%Docstring
|
%Docstring
|
||||||
Returns if this geometry check is compatible with ``layer``.
|
Returns if this geometry check is compatible with ``layer``.
|
||||||
By default it checks for the geometry type in ``compatibleGeometryTypes``().
|
By default it checks for the geometry type in :py:func:`~compatibleGeometryTypes`.
|
||||||
|
|
||||||
.. versionadded:: 3.4
|
.. versionadded:: 3.4
|
||||||
%End
|
%End
|
||||||
|
Loading…
x
Reference in New Issue
Block a user