Skip to content
Permalink
Browse files
Indicates z
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 21, 2021
1 parent bccfb2d commit 89b5097ded24a60d8f58ac65294004b1b1401043
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 89b5097

Please sign in to comment.