Skip to content

Commit b9b9bc3

Browse files
committed
geometry validation: don't consider touching lines as intersection (fixes #3851, fixes #7501, fixes #9580)
1 parent 7c4c7e8 commit b9b9bc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/qgsgeometryvalidator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void QgsGeometryValidator::checkRingIntersections(
6262
if ( d >= 0 && d <= v.length() )
6363
{
6464
d = -distLine2Point( ring1[j], w.perpVector(), s );
65-
if ( d >= 0 && d <= w.length() )
65+
if ( d > 0 && d < w.length() )
6666
{
6767
QString msg = QObject::tr( "segment %1 of ring %2 of polygon %3 intersects segment %4 of ring %5 of polygon %6 at %7" )
6868
.arg( i0 ).arg( i ).arg( p0 )
@@ -150,7 +150,7 @@ void QgsGeometryValidator::validatePolyline( int i, QgsPolyline line, bool ring
150150
continue;
151151

152152
d = -distLine2Point( line[k], w.perpVector(), s );
153-
if ( d < 0 || d > w.length() )
153+
if ( d <= 0 || d >= w.length() )
154154
continue;
155155

156156
QString msg = QObject::tr( "segments %1 and %2 of line %3 intersect at %4" ).arg( j ).arg( k ).arg( i ).arg( s.toString() );

0 commit comments

Comments
 (0)