Skip to content
Permalink
Browse files

Remaining docs

  • Loading branch information
m-kuhn committed Dec 22, 2018
1 parent d3f64de commit 929df96e207cc3d0ec6a33b6999859eb8b750ba6
@@ -66,6 +66,13 @@ The type of this check.
template<T>
class QgsGeometryCheckFactoryT : QgsGeometryCheckFactory
{
%Docstring
Template to create a factory for a geometry check.

.. note::

Not available in Python bindings.
%End

%TypeHeaderCode
#include "qgsgeometrycheckfactory.h"
@@ -28,7 +28,11 @@ An error from a QgsSingleGeometryCheck.
#include "qgssinglegeometrycheck.h"
%End
public:

QgsSingleGeometryCheckError( const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QgsVertexId &vertexId = QgsVertexId() );
%Docstring
Creates a new single geometry check error.
%End

virtual ~QgsSingleGeometryCheckError();

@@ -93,7 +97,11 @@ The single error can be obtained via singleError.
#include "qgssinglegeometrycheck.h"
%End
public:

QgsGeometryCheckErrorSingle( QgsSingleGeometryCheckError *singleError, const QgsGeometryCheckerUtils::LayerFeature &layerFeature );
%Docstring
Creates a new error for a :py:class:`QgsSingleGeometryCheck`.
%End

QgsSingleGeometryCheckError *singleError() const;
%Docstring
@@ -173,6 +173,11 @@ class ANALYSIS_EXPORT QgsGeometryCheck
virtual ~QgsGeometryCheck() = default;

#ifndef SIP_RUN

/**
* Returns the configuration value with the \a name, saved in the QGIS settings for
* this geometry check. If no configuration could be found, \a defaultValue is returned.
*/
template <class T>
T configurationValue( const QString &name, const QVariant &defaultValue = QVariant() )
{
@@ -265,35 +270,35 @@ class ANALYSIS_EXPORT QgsGeometryCheck
/**
* Replaces a part in a feature geometry.
*
* \since QGIS 3.4
* \note Not available in Python bindings
* \since QGIS 3.4
*/
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
* \since QGIS 3.4
*/
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
* \since QGIS 3.4
*/
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.
* Determines the scale factor of a layer to the map coordinate reference system.
*
* \since QGIS 3.4
* \note Not available in Python bindings
* \since QGIS 3.4
*/
double scaleFactor( const QPointer<QgsVectorLayer> &layer ) const SIP_SKIP;
};
@@ -113,13 +113,20 @@ class ANALYSIS_EXPORT QgsGeometryCheckerUtils
{
public:
#ifndef SIP_RUN

/**
* Creates a new set of layer and features.
*/
LayerFeatures( const QMap<QString, QgsFeaturePool *> &featurePools,
const QMap<QString, QgsFeatureIds> &featureIds,
const QList<QgsWkbTypes::GeometryType> &geometryTypes,
QgsFeedback *feedback,
const QgsGeometryCheckContext *context,
bool useMapCrs = false );

/**
* Creates a new set of layer and features.
*/
LayerFeatures( const QMap<QString, QgsFeaturePool *> &featurePools,
const QList<QString> &layerIds, const QgsRectangle &extent,
const QList<QgsWkbTypes::GeometryType> &geometryTypes,
@@ -135,11 +142,33 @@ class ANALYSIS_EXPORT QgsGeometryCheckerUtils
class iterator
{
public:

/**
* Creates a new iterator.
*/
iterator( const QList<QString>::const_iterator &layerIt, const LayerFeatures *parent );

/**
* Copies the iterator \a rh.
*/
iterator( const iterator &rh );
~iterator();

/**
* Increments the item the iterator currently points to by one and
* returns the new iterator.
*/
const iterator &operator++();
iterator operator++( int );

/**
* Increments the item the iterator currently points to by \a n and
* returns the new iterator.
*/
iterator operator++( int n );

/**
* Dereferences the item at the current iterator location.
*/
const QgsGeometryCheckerUtils::LayerFeature &operator*() const;
bool operator!=( const iterator &other );

@@ -82,6 +82,11 @@ class ANALYSIS_EXPORT QgsGeometryCheckFactory SIP_ABSTRACT
virtual QgsGeometryCheck::CheckType checkType() const = 0;
};

/**
* Template to create a factory for a geometry check.
*
* \note Not available in Python bindings.
*/
template<class T>
class QgsGeometryCheckFactoryT : public QgsGeometryCheckFactory
{
@@ -31,6 +31,10 @@ email : matthias@opengis.ch
class ANALYSIS_EXPORT QgsGeometryIsValidCheckError : public QgsSingleGeometryCheckError
{
public:

/**
* Creates a new is valid check error.
*/
QgsGeometryIsValidCheckError( const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QString &errorDescription );

QString description() const override;
@@ -40,6 +44,8 @@ class ANALYSIS_EXPORT QgsGeometryIsValidCheckError : public QgsSingleGeometryChe
};

/**
* \ingroup analysis
*
* Checks if geometries are valid using the backend configured in the QGIS settings.
* This does not offer any fixes but makes sure that all geometries are valid.
*
@@ -39,6 +39,10 @@ class QgsSingleGeometryCheck;
class ANALYSIS_EXPORT QgsSingleGeometryCheckError
{
public:

/**
* Creates a new single geometry check error.
*/
QgsSingleGeometryCheckError( const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QgsVertexId &vertexId = QgsVertexId() )
: mCheck( check )
, mGeometry( geometry )
@@ -111,6 +115,10 @@ class ANALYSIS_EXPORT QgsSingleGeometryCheckError
class ANALYSIS_EXPORT QgsGeometryCheckErrorSingle : public QgsGeometryCheckError
{
public:

/**
* Creates a new error for a QgsSingleGeometryCheck.
*/
QgsGeometryCheckErrorSingle( QgsSingleGeometryCheckError *singleError, const QgsGeometryCheckerUtils::LayerFeature &layerFeature );

/**

0 comments on commit 929df96

Please sign in to comment.
You can’t perform that action at this time.