Skip to content

Commit 4841027

Browse files
committed
[labeling] Geometry transformations may result in nan points,
so filter these out when registering labeled features
1 parent f092c7e commit 4841027

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/qgspallabeling.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,6 +2899,11 @@ QgsGeometry QgsPalLabeling::prepareGeometry( const QgsGeometry &geometry, QgsRen
28992899
QgsDebugMsgLevel( QString( "Ignoring feature due to transformation exception" ), 4 );
29002900
return QgsGeometry();
29012901
}
2902+
// geometry transforms may result in nan points, remove these
2903+
geom.filterVertices( []( const QgsPoint & point )->bool
2904+
{
2905+
return std::isfinite( point.x() ) && std::isfinite( point.y() );
2906+
} );
29022907
}
29032908

29042909
// Rotate the geometry if needed, before clipping

0 commit comments

Comments
 (0)