Skip to content
Permalink
Browse files

[processing] Log features that could not be divided in tessellate alg.

  • Loading branch information
nirvn committed Apr 24, 2019
1 parent 7363276 commit 6395dad8d0729f954d04870b87e912078b8d399b
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/3d/processing/qgsalgorithmtessellate.cpp
@@ -79,7 +79,7 @@ QgsTessellateAlgorithm *QgsTessellateAlgorithm::createInstance() const
return new QgsTessellateAlgorithm();
}

QgsFeatureList QgsTessellateAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback * )
QgsFeatureList QgsTessellateAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback *feedback )
{
QgsFeature f = feature;
if ( f.hasGeometry() )
@@ -106,7 +106,14 @@ QgsFeatureList QgsTessellateAlgorithm::processFeature( const QgsFeature &feature
t.addPolygon( *p, 0 );
}
QgsGeometry g( t.asMultiPolygon() );
g.translate( bounds.xMinimum(), bounds.yMinimum() );
if ( !g.isEmpty() )
{
g.translate( bounds.xMinimum(), bounds.yMinimum() );
}
else
{
feedback->reportError( QObject::tr( "Feature ID %1 could not be divided into triangular components." ).arg( f.id() ) );
}
f.setGeometry( g );
}
}

0 comments on commit 6395dad

Please sign in to comment.
You can’t perform that action at this time.