Skip to content
Permalink
Browse files
Indicates z
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 19, 2021
1 parent 009b649 commit c2fb851a69b4beb5e731cc501c3e9dcb458e8ef9
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/qgsgeometryvalidator.cpp
@@ -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;
}

0 comments on commit c2fb851

Please sign in to comment.