Skip to content

Commit

Permalink
Further doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 22, 2018
1 parent 265df93 commit d3f64de
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 3 deletions.
Expand Up @@ -164,6 +164,10 @@ Returns the context
protected: protected:








}; };


/************************************************************************ /************************************************************************
Expand Down
Expand Up @@ -10,7 +10,6 @@







class QgsGeometryCheckerUtils class QgsGeometryCheckerUtils
{ {
%Docstring %Docstring
Expand All @@ -28,8 +27,16 @@ Contains utilities required for geometry checks.
#include "qgsgeometrycheckerutils.h" #include "qgsgeometrycheckerutils.h"
%End %End
public: public:

class LayerFeature class LayerFeature
{ {
%Docstring

A layer feature combination to uniquely identify and access a feature in
a set of layers.

.. versionadded:: 3.4
%End


%TypeHeaderCode %TypeHeaderCode
#include "qgsgeometrycheckerutils.h" #include "qgsgeometrycheckerutils.h"
Expand Down Expand Up @@ -79,6 +86,12 @@ Returns if the geometry is reprojected to the map CRS or not.


class LayerFeatures 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 %TypeHeaderCode
#include "qgsgeometrycheckerutils.h" #include "qgsgeometrycheckerutils.h"
Expand Down
34 changes: 34 additions & 0 deletions src/analysis/vector/geometry_checker/qgsgeometrycheck.h
Expand Up @@ -253,14 +253,48 @@ class ANALYSIS_EXPORT QgsGeometryCheck
const QgsGeometryCheckContext *context() const { return mContext; } const QgsGeometryCheckContext *context() const { return mContext; }


protected: 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; 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; 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; 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; void deleteFeatureGeometryRing( const QMap<QString, QgsFeaturePool *> &featurePools, const QString &layerId, QgsFeature &feature, int partIdx, int ringIdx, Changes &changes ) const SIP_SKIP;


const QgsGeometryCheckContext *mContext; const QgsGeometryCheckContext *mContext;
QVariantMap mConfiguration; 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; double scaleFactor( const QPointer<QgsVectorLayer> &layer ) const SIP_SKIP;
}; };


Expand Down
Expand Up @@ -39,6 +39,7 @@ class QgsFeedback;
class ANALYSIS_EXPORT QgsGeometryCheckerUtils class ANALYSIS_EXPORT QgsGeometryCheckerUtils
{ {
public: public:

/** /**
* \ingroup analysis * \ingroup analysis
* *
Expand Down Expand Up @@ -128,7 +129,7 @@ class ANALYSIS_EXPORT QgsGeometryCheckerUtils
* \ingroup analysis * \ingroup analysis
* *
* An iterator over all features in a QgsGeometryCheckerUtils::LayerFeatures. * An iterator over all features in a QgsGeometryCheckerUtils::LayerFeatures.
* *
* \since QGIS 3.4 * \since QGIS 3.4
*/ */
class iterator class iterator
Expand Down
12 changes: 12 additions & 0 deletions src/analysis/vector/geometry_checker/qgsgeometryisvalidcheck.h
Expand Up @@ -20,6 +20,14 @@ email : matthias@opengis.ch


#include "qgssinglegeometrycheck.h" #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 class ANALYSIS_EXPORT QgsGeometryIsValidCheckError : public QgsSingleGeometryCheckError
{ {
public: public:
Expand All @@ -40,6 +48,10 @@ class ANALYSIS_EXPORT QgsGeometryIsValidCheckError : public QgsSingleGeometryChe
class ANALYSIS_EXPORT QgsGeometryIsValidCheck : public QgsSingleGeometryCheck class ANALYSIS_EXPORT QgsGeometryIsValidCheck : public QgsSingleGeometryCheck
{ {
public: 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 ); explicit QgsGeometryIsValidCheck( const QgsGeometryCheckContext *context, const QVariantMap &configuration );


QList<QgsWkbTypes::GeometryType> compatibleGeometryTypes() const override; QList<QgsWkbTypes::GeometryType> compatibleGeometryTypes() const override;
Expand Down
3 changes: 2 additions & 1 deletion tests/code_layout/acceptable_missing_doc.py
Expand Up @@ -489,7 +489,8 @@
"QgsGeometrySelfIntersectionCheck": ["QgsGeometrySelfIntersectionCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration=QVariantMap())", "ResolutionMethod"], "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)"], "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)"], "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 = [ ACCEPTABLE_MISSING_ADDED_NOTE = [
Expand Down

0 comments on commit d3f64de

Please sign in to comment.