Skip to content
Permalink
Browse files

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.
  • Loading branch information
m-kuhn committed Oct 25, 2018
1 parent a0e3c2d commit 32cdf3a0b2618922b9883c73f0c39c6555633cbc
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp
@@ -98,7 +98,8 @@ void QgsGeometryGapCheck::collectErrors( const QMap<QString, QgsFeaturePool *> &
{
std::unique_ptr<QgsAbstractGeometry> gapGeom( QgsGeometryCheckerUtils::getGeomPart( diffGeom.get(), iPart )->clone() );
// Skip the gap between features and boundingbox
if ( gapGeom->boundingBox() == envelope->boundingBox() )
const double spacing = context()->tolerance;
if ( gapGeom->boundingBox().snappedToGrid( spacing ) == envelope->boundingBox().snappedToGrid( spacing ) )
{
continue;
}

0 comments on commit 32cdf3a

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