Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33796 from m-kuhn/new_gap_fixes
Improved resolution methods for geometry validation
- Loading branch information
Showing
35 changed files
with
388 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...n/analysis/auto_generated/vector/geometry_checker/qgsgeometrycheckresolutionmethod.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/vector/geometry_checker/qgsgeometrycheckresolutionmethod.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
class QgsGeometryCheckResolutionMethod | ||
{ | ||
%Docstring | ||
This class implements a resolution for problems detected in geometry checks. | ||
|
||
.. versionadded:: 3.12 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsgeometrycheckresolutionmethod.h" | ||
%End | ||
public: | ||
|
||
QgsGeometryCheckResolutionMethod( int id, const QString &name, const QString &description, bool isStable = true ); | ||
%Docstring | ||
Creates a new method with the specified parameters. | ||
%End | ||
|
||
int id() const; | ||
%Docstring | ||
An id that is unique per check. This will be used to trigger resolutions. | ||
%End | ||
|
||
bool isStable() const; | ||
%Docstring | ||
If this fix is stable enough to be listed by default. | ||
%End | ||
|
||
QString name() const; | ||
%Docstring | ||
A human readable and translated name for this fix. | ||
%End | ||
|
||
QString description() const; | ||
%Docstring | ||
A human readable and translated description for this fix. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/vector/geometry_checker/qgsgeometrycheckresolutionmethod.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/analysis/vector/geometry_checker/qgsgeometrycheckresolutionmethod.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/*************************************************************************** | ||
qgsgeometrycheckresolutionmethod.cpp | ||
-------------------------------------- | ||
Date : January 2020 | ||
Copyright : (C) 2020 Matthias Kuhn | ||
Email : matthias@opengis.ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsgeometrycheckresolutionmethod.h" | ||
|
||
QgsGeometryCheckResolutionMethod::QgsGeometryCheckResolutionMethod( int id, const QString &name, const QString &description, bool isStable ) | ||
: mId( id ) | ||
, mIsStable( isStable ) | ||
, mName( name ) | ||
, mDescription( description ) | ||
{ | ||
} | ||
|
||
int QgsGeometryCheckResolutionMethod::id() const | ||
{ | ||
return mId; | ||
} | ||
|
||
bool QgsGeometryCheckResolutionMethod::isStable() const | ||
{ | ||
return mIsStable; | ||
} | ||
|
||
QString QgsGeometryCheckResolutionMethod::name() const | ||
{ | ||
return mName; | ||
} | ||
|
||
QString QgsGeometryCheckResolutionMethod::description() const | ||
{ | ||
return mDescription; | ||
} |
64 changes: 64 additions & 0 deletions
64
src/analysis/vector/geometry_checker/qgsgeometrycheckresolutionmethod.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/*************************************************************************** | ||
qgsgeometrycheckresolutionmethod.h | ||
-------------------------------------- | ||
Date : January 2020 | ||
Copyright : (C) 2020 Matthias Kuhn | ||
Email : matthias@opengis.ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSGEOMETRYCHECKRESOLUTIONMETHOD_H | ||
#define QGSGEOMETRYCHECKRESOLUTIONMETHOD_H | ||
|
||
#include <QString> | ||
#include "qgis_analysis.h" | ||
|
||
/** | ||
* \ingroup analysis | ||
* This class implements a resolution for problems detected in geometry checks. | ||
* | ||
* \since QGIS 3.12 | ||
*/ | ||
class ANALYSIS_EXPORT QgsGeometryCheckResolutionMethod | ||
{ | ||
public: | ||
|
||
/** | ||
* Creates a new method with the specified parameters. | ||
*/ | ||
QgsGeometryCheckResolutionMethod( int id, const QString &name, const QString &description, bool isStable = true ); | ||
|
||
/** | ||
* An id that is unique per check. This will be used to trigger resolutions. | ||
*/ | ||
int id() const; | ||
|
||
/** | ||
* If this fix is stable enough to be listed by default. | ||
*/ | ||
bool isStable() const; | ||
|
||
/** | ||
* A human readable and translated name for this fix. | ||
*/ | ||
QString name() const; | ||
|
||
/** | ||
* A human readable and translated description for this fix. | ||
*/ | ||
QString description() const; | ||
|
||
private: | ||
int mId = -1; | ||
bool mIsStable = false; | ||
QString mName; | ||
QString mDescription; | ||
}; | ||
|
||
#endif // QGSGEOMETRYCHECKRESOLUTIONMETHOD_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.