Skip to content
Permalink
Browse files
Fix comparison with square tolerance also in QgsGeometryAngleCheck
  • Loading branch information
mhugent authored and github-actions committed Nov 2, 2021
1 parent 8c66a35 commit 77ef0239a5865d6ac585e79fd55c41d57bca5831
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/analysis/vector/geometry_checker/qgsgeometryanglecheck.cpp
@@ -138,7 +138,7 @@ void QgsGeometryAngleCheck::fixError( const QMap<QString, QgsFeaturePool *> &fea
{
changes[error->layerId()][error->featureId()].append( Change( ChangeNode, ChangeRemoved, vidx ) );
// Avoid duplicate nodes as result of deleting spike vertex
if ( QgsGeometryUtils::sqrDistance2D( p1, p3 ) < mContext->tolerance &&
if ( QgsGeometryUtils::sqrDistance2D( p1, p3 ) < ( mContext->tolerance * mContext->tolerance ) &&
QgsGeometryCheckerUtils::canDeleteVertex( geometry, vidx.part, vidx.ring ) &&
geometry->deleteVertex( error->vidx() ) ) // error->vidx points to p3 after removing p2
{

0 comments on commit 77ef023

Please sign in to comment.