Skip to content
Permalink
Browse files

[Geometry checker] Add more fixError tests

  • Loading branch information
manisandro committed Oct 17, 2017
1 parent 3b6a0e2 commit 876418c44e157f0b49f98e1bc32c86156e543f6a
@@ -86,9 +86,10 @@ class ANALYSIS_EXPORT QgsGeometryGapCheck : public QgsGeometryCheck
QString errorDescription() const override { return tr( "Gap" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryGapCheck" ); }

private:
enum ResolutionMethod { MergeLongestEdge, NoChange };

private:

double mThresholdMapUnits;

bool mergeWithNeighbor( QgsGeometryGapCheckError *err, Changes &changes, QString &errMsg ) const;
@@ -30,7 +30,7 @@ class ANALYSIS_EXPORT QgsGeometryHoleCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Polygon with hole" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryHoleCheck" ); }
private:

enum ResolutionMethod { RemoveHoles, NoChange };
};

@@ -31,7 +31,7 @@ class ANALYSIS_EXPORT QgsGeometryLineIntersectionCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Intersection" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryLineIntersectionCheck" ); }
private:

enum ResolutionMethod { NoChange };
};

@@ -31,8 +31,10 @@ class ANALYSIS_EXPORT QgsGeometryLineLayerIntersectionCheck : public QgsGeometry
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Intersection" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryLineLayerIntersectionCheck" ); }
private:

enum ResolutionMethod { NoChange };

private:
QString mCheckLayer;
};

@@ -30,7 +30,7 @@ class ANALYSIS_EXPORT QgsGeometryMultipartCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Multipart object with only one feature" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryMultipartCheck" ); }
private:

enum ResolutionMethod { ConvertToSingle, RemoveObject, NoChange };
};

@@ -69,8 +69,10 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Overlap" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryOverlapCheck" ); }
private:

enum ResolutionMethod { Subtract, NoChange };

private:
double mThresholdMapUnits;
};

@@ -31,7 +31,7 @@ class ANALYSIS_EXPORT QgsGeometryPointCoveredByLineCheck : public QgsGeometryChe
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Point not covered by line" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryPointCoveredByLineCheck" ); }
private:

enum ResolutionMethod { NoChange };
};

@@ -31,7 +31,7 @@ class ANALYSIS_EXPORT QgsGeometryPointInPolygonCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Point not in polygon" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometryPointInPolygonCheck" ); }
private:

enum ResolutionMethod { NoChange };
};

@@ -32,8 +32,10 @@ class ANALYSIS_EXPORT QgsGeometrySegmentLengthCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Minimal segment length" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometrySegmentLengthCheck" ); }
private:

enum ResolutionMethod { NoChange };

private:
double mMinLengthMapUnits;
};

@@ -22,7 +22,7 @@ class ANALYSIS_EXPORT QgsGeometrySelfContactCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const;
QString errorDescription() const { return tr( "Self contact" ); }
QString errorName() const { return QStringLiteral( "QgsGeometrySelfContactCheck" ); }
private:

enum ResolutionMethod { NoChange };
};

@@ -57,7 +57,7 @@ class ANALYSIS_EXPORT QgsGeometrySelfIntersectionCheck : public QgsGeometryCheck
QStringList getResolutionMethods() const override;
QString errorDescription() const override { return tr( "Self intersection" ); }
QString errorName() const override { return QStringLiteral( "QgsGeometrySelfIntersectionCheck" ); }
private:

enum ResolutionMethod { ToMultiObject, ToSingleObjects, NoChange };
};

0 comments on commit 876418c

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