Further doc improvements

This commit is contained in:
Matthias Kuhn 2018-12-22 11:54:43 +01:00
parent 265df93769
commit d3f64deb80
No known key found for this signature in database
GPG Key ID: A0E766808764D73F
6 changed files with 68 additions and 3 deletions

View File

@ -164,6 +164,10 @@ Returns the context
protected:
};
/************************************************************************

View File

@ -10,7 +10,6 @@
class QgsGeometryCheckerUtils
{
%Docstring
@ -28,8 +27,16 @@ Contains utilities required for geometry checks.
#include "qgsgeometrycheckerutils.h"
%End
public:
class LayerFeature
{
%Docstring
A layer feature combination to uniquely identify and access a feature in
a set of layers.
.. versionadded:: 3.4
%End
%TypeHeaderCode
#include "qgsgeometrycheckerutils.h"
@ -79,6 +86,12 @@ Returns if the geometry is reprojected to the map CRS or not.
class LayerFeatures
{
%Docstring
Contains a set of layers and feature ids in those layers to pass to a geometry check.
.. versionadded:: 3.4
%End
%TypeHeaderCode
#include "qgsgeometrycheckerutils.h"

View File

@ -253,14 +253,48 @@ class ANALYSIS_EXPORT QgsGeometryCheck
const QgsGeometryCheckContext *context() const { return mContext; }
protected:
/**
* Returns all layers and feature ids.
*
* \since QGIS 3.4
* \note Not available in Python bindings
*/
QMap<QString, QgsFeatureIds> allLayerFeatureIds( const QMap<QString, QgsFeaturePool *> &featurePools ) const SIP_SKIP;
/**
* Replaces a part in a feature geometry.
*
* \since QGIS 3.4
* \note Not available in Python bindings
*/
void replaceFeatureGeometryPart( const QMap<QString, QgsFeaturePool *> &featurePools, const QString &layerId, QgsFeature &feature, int partIdx, QgsAbstractGeometry *newPartGeom, Changes &changes ) const SIP_SKIP;
/**
* Deletes a part of a feature geometry.
*
* \since QGIS 3.4
* \note Not available in Python bindings
*/
void deleteFeatureGeometryPart( const QMap<QString, QgsFeaturePool *> &featurePools, const QString &layerId, QgsFeature &feature, int partIdx, Changes &changes ) const SIP_SKIP;
/**
* Deletes a ring in a feature geometry.
*
* \since QGIS 3.4
* \note Not available in Python bindings
*/
void deleteFeatureGeometryRing( const QMap<QString, QgsFeaturePool *> &featurePools, const QString &layerId, QgsFeature &feature, int partIdx, int ringIdx, Changes &changes ) const SIP_SKIP;
const QgsGeometryCheckContext *mContext;
QVariantMap mConfiguration;
/**
* Determin the scale factor of a layer to the map coordiante reference system.
*
* \since QGIS 3.4
* \note Not available in Python bindings
*/
double scaleFactor( const QPointer<QgsVectorLayer> &layer ) const SIP_SKIP;
};

View File

@ -39,6 +39,7 @@ class QgsFeedback;
class ANALYSIS_EXPORT QgsGeometryCheckerUtils
{
public:
/**
* \ingroup analysis
*
@ -128,7 +129,7 @@ class ANALYSIS_EXPORT QgsGeometryCheckerUtils
* \ingroup analysis
*
* An iterator over all features in a QgsGeometryCheckerUtils::LayerFeatures.
*
*
* \since QGIS 3.4
*/
class iterator

View File

@ -20,6 +20,14 @@ email : matthias@opengis.ch
#include "qgssinglegeometrycheck.h"
/**
* \ingroup analysis
*
* An error for a QgsGeometryIsValid check.
* The description is delivered by the underlying check engine, either GEOS or QGIS internal.
*
* \since QGIS 3.4
*/
class ANALYSIS_EXPORT QgsGeometryIsValidCheckError : public QgsSingleGeometryCheckError
{
public:
@ -40,6 +48,10 @@ class ANALYSIS_EXPORT QgsGeometryIsValidCheckError : public QgsSingleGeometryChe
class ANALYSIS_EXPORT QgsGeometryIsValidCheck : public QgsSingleGeometryCheck
{
public:
/**
* Creates a new is valid check with the provided \a context. No options are supported in \a configuration.
*/
explicit QgsGeometryIsValidCheck( const QgsGeometryCheckContext *context, const QVariantMap &configuration );
QList<QgsWkbTypes::GeometryType> compatibleGeometryTypes() const override;

View File

@ -489,7 +489,8 @@ ACCEPTABLE_MISSING_DOCS = {
"QgsGeometrySelfIntersectionCheck": ["QgsGeometrySelfIntersectionCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration=QVariantMap())", "ResolutionMethod"],
"QgsGeometryContainedCheck": ["factoryDescription()", "factoryId()", "factoryCompatibleGeometryTypes()", "factoryIsCompatible(QgsVectorLayer *layer)", "ResolutionMethod", "factoryCheckType()", "QgsGeometryContainedCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)"],
"QgsGeometryPointInPolygonCheck": ["factoryDescription()", "factoryId()", "factoryCompatibleGeometryTypes()", "factoryIsCompatible(QgsVectorLayer *layer)", "ResolutionMethod", "factoryCheckType()", "QgsGeometryPointInPolygonCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)"],
"QgsGeometryDuplicateNodesCheck": ["factoryDescription()", "factoryId()", "factoryCompatibleGeometryTypes()", "factoryIsCompatible(QgsVectorLayer *layer)", "ResolutionMethod", "factoryCheckType()", "QgsGeometryDuplicateNodesCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)"]
"QgsGeometryDuplicateNodesCheck": ["factoryDescription()", "factoryId()", "factoryCompatibleGeometryTypes()", "factoryIsCompatible(QgsVectorLayer *layer)", "ResolutionMethod", "factoryCheckType()", "QgsGeometryDuplicateNodesCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)"],
"QgsGeometryChecker": ["getContext() const", "featurePools() const", "setMergeAttributeIndices(const QMap< QString, int > &mergeAttributeIndices)", "progressValue(int value)", "getChecks() const", "errorAdded(QgsGeometryCheckError *error)", "QgsGeometryChecker(const QList< QgsGeometryCheck * > &checks, QgsGeometryCheckContext *context, const QMap< QString, QgsFeaturePool * > &featurePools)", "fixError(QgsGeometryCheckError *error, int method, bool triggerRepaint=false)", "errorUpdated(QgsGeometryCheckError *error, bool statusChanged)", "execute(int *totalSteps=nullptr)", "getMessages() const"]
}
ACCEPTABLE_MISSING_ADDED_NOTE = [