Skip to content
Browse files

Fix some GEOS noise when trying to register a line string with only

one vertex as a feature in the labeling engine

We no longer try to register these features as obstacles for labels -
it's not possible to handle these and they just result in noisy
geos warnings on the console.
  • Loading branch information
nyalldawson committed Nov 18, 2020
1 parent 1c076ee commit 2677d55d2eceea873aa9e0b87c13434faa41fe60
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/labeling/qgspallabeling.cpp
@@ -2657,6 +2657,13 @@ void QgsPalLayerSettings::registerObstacleFeature( const QgsFeature &f, QgsRende

// don't even try to register linestrings with only one vertex as an obstacle
if ( const QgsLineString *ls = qgsgeometry_cast< const QgsLineString * >( geom.constGet() ) )
if ( ls->numPoints() < 2 )

// simplify?
const QgsVectorSimplifyMethod &simplifyMethod = context.vectorSimplifyMethod();
std::unique_ptr<QgsGeometry> scopedClonedGeom;

0 comments on commit 2677d55

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