Skip to content

Commit 32cdf3a

Browse files
committed
Do not report envelope as gap
Under some circumstances, the envelope of a check region would be reported as a gap. While a check that this doesn't happen is normally enforced, this check doesn't work when the features happen to be placed unfortunate enough to have their bounding box rounded differently than the envelope.
1 parent a0e3c2d commit 32cdf3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ void QgsGeometryGapCheck::collectErrors( const QMap<QString, QgsFeaturePool *> &
9898
{
9999
std::unique_ptr<QgsAbstractGeometry> gapGeom( QgsGeometryCheckerUtils::getGeomPart( diffGeom.get(), iPart )->clone() );
100100
// Skip the gap between features and boundingbox
101-
if ( gapGeom->boundingBox() == envelope->boundingBox() )
101+
const double spacing = context()->tolerance;
102+
if ( gapGeom->boundingBox().snappedToGrid( spacing ) == envelope->boundingBox().snappedToGrid( spacing ) )
102103
{
103104
continue;
104105
}

0 commit comments

Comments
 (0)