Skip to content

Commit

Permalink
geometry validator: fix touching lines check (followup b9b9bc3, fixes #…
Browse files Browse the repository at this point in the history
…12730)

(cherry picked from commit 3eef29a)
  • Loading branch information
jef-n committed Jun 30, 2015
1 parent 4d1d2ff commit 2a066d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgsgeometryvalidator.cpp
Expand Up @@ -62,7 +62,9 @@ void QgsGeometryValidator::checkRingIntersections(
if ( d >= 0 && d <= v.length() )
{
d = -distLine2Point( ring1[j], w.perpVector(), s );
if ( d > 0 && d < w.length() )
if ( d > 0 && d < w.length() &&
ring0[i+1] != ring1[j+1] && ring0[i+1] != ring1[j] &&
ring0[i+0] != ring1[j+1] && ring0[i+0] != ring1[j] )
{
QString msg = QObject::tr( "segment %1 of ring %2 of polygon %3 intersects segment %4 of ring %5 of polygon %6 at %7" )
.arg( i0 ).arg( i ).arg( p0 )
Expand Down

0 comments on commit 2a066d8

Please sign in to comment.