Skip to content

Commit

Permalink
[labeling] Geometry transformations may result in nan points,
Browse files Browse the repository at this point in the history
so filter these out when registering labeled features
  • Loading branch information
nyalldawson committed May 29, 2018
1 parent f092c7e commit 4841027
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2899,6 +2899,11 @@ QgsGeometry QgsPalLabeling::prepareGeometry( const QgsGeometry &geometry, QgsRen
QgsDebugMsgLevel( QString( "Ignoring feature due to transformation exception" ), 4 );
return QgsGeometry();
}
// geometry transforms may result in nan points, remove these
geom.filterVertices( []( const QgsPoint & point )->bool
{
return std::isfinite( point.x() ) && std::isfinite( point.y() );
} );
}

// Rotate the geometry if needed, before clipping
Expand Down

0 comments on commit 4841027

Please sign in to comment.