Navigation Menu

Skip to content

Commit

Permalink
[processing] Log features that could not be divided in tessellate alg.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Apr 24, 2019
1 parent 7363276 commit 6395dad
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/3d/processing/qgsalgorithmtessellate.cpp
Expand Up @@ -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() )
Expand All @@ -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 );
}
}
Expand Down

0 comments on commit 6395dad

Please sign in to comment.