Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Indicates z
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 8, 2021
1 parent df02c00 commit d41f3cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/qgsgeometryvalidator.cpp
Expand Up @@ -99,17 +99,19 @@ void QgsGeometryValidator::validatePolyline( int i, const QgsLineString *line, b

if ( !line->isClosed() )
{
QgsPoint startPoint = line->startPoint();
QgsPoint endPoint = line->endPoint();
QString msg;
if ( line->is3D() && line->is2DClosed() )
{
msg = QObject::tr( "ring %1 not closed, Z mismatch" ).arg( i );
msg = QObject::tr( "ring %1 not closed, Z mismatch: %2 vs %3" ).arg( i ).arg( startPoint.z() ).arg( endPoint.z() );
}
else
{
msg = QObject::tr( "ring %1 not closed" ).arg( i );
QgsDebugMsgLevel( msg, 2 );
}
emit errorFound( QgsGeometry::Error( msg, QgsPointXY( line->startPoint().x(), line->startPoint().y() ) ) );
emit errorFound( QgsGeometry::Error( msg, QgsPointXY( startPoint.x(), startPoint.y() ) ) );
mErrorCount++;
return;
}
Expand Down

0 comments on commit d41f3cf

Please sign in to comment.