Bug report #15341

Inside perimeter polygon labelling not right

Added by Frits van Veen over 8 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Unknown
Affected QGIS version:2.16.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23273

Description

A polygon is clipped (for presumeably performance reasons) to the visible area before labelling is applied.
If the resulting polygon is a simple one, all works well. If it is a multipolygon (see the extra edges at the bottom of the view) only one label is plotted and it is on the wrong side of the polygon.
Settings:
Placement: Using Perimeter
Allowed positions: Below line / Line orientation dependent position checked
Repeat: 100 mm

Inside_perimeter_polygon_labelling.png (31.2 KB) Frits van Veen, 2016-07-25 10:47 PM

Inside_perimeter_multipolygon_labelling.png (21.6 KB) Frits van Veen, 2016-07-25 10:47 PM

Inside_perimeter_multipolygon_labelling_-_fixed.png (33.8 KB) Frits van Veen, 2016-07-26 05:34 AM

Associated revisions

Revision c0b16840
Added by Frits van Veen over 8 years ago

Fix labeling using perimeter with repeating label distance set

If the visible part of a polygon is clipped and becomes a multipolygon, only
one label is plotted on the wrong side of the polygon.

Settings:
Placement: Using Perimeter
Allowed positions: Below line / Line orientation dependent position checked
Repeat: 100 mm

Fix #15341

Revision b2fb248a
Added by Nyall Dawson over 8 years ago

Fix labeling using perimeter with repeating label distance set

If the visible part of a polygon is clipped and becomes a multipolygon, only
one label is plotted on the wrong side of the polygon.

Settings:
Placement: Using Perimeter
Allowed positions: Below line / Line orientation dependent position checked
Repeat: 100 mm

Fix #15341

(cherry-picked from c0b1684058a5acf3ae58ea63bea7b00520e27725)

Revision 3f331900
Added by Nyall Dawson over 8 years ago

Fix labeling using perimeter with repeating label distance set

If the visible part of a polygon is clipped and becomes a multipolygon, only
one label is plotted on the wrong side of the polygon.

Settings:
Placement: Using Perimeter
Allowed positions: Below line / Line orientation dependent position checked
Repeat: 100 mm

Fix #15341

(cherry-picked from c0b1684058a5acf3ae58ea63bea7b00520e27725)

Revision bfa77141
Added by Nyall Dawson over 8 years ago

Fix labeling using perimeter with repeating label distance set

If the visible part of a polygon is clipped and becomes a multipolygon, only
one label is plotted on the wrong side of the polygon.

Settings:
Placement: Using Perimeter
Allowed positions: Below line / Line orientation dependent position checked
Repeat: 100 mm

Fix #15341

(cherry-picked from c0b1684058a5acf3ae58ea63bea7b00520e27725)

History

#1 Updated by Frits van Veen over 8 years ago

I've got a fix!
in QgsPalLayerSettings::registerFeature line 2520 I changed
if ( GEOSGeomTypeId_r( QgsGeometry::getGEOSHandler(), geos_geom ) GEOS_POLYGON && repeatDistance > 0 && placement Line )
to
GEOSGeomTypes geomType = (GEOSGeomTypes) GEOSGeomTypeId_r( QgsGeometry::getGEOSHandler(), geos_geom );
if ( (geomType GEOS_POLYGON || geomType GEOS_MULTIPOLYGON) && repeatDistance > 0 && placement == Line )

#2 Updated by Frits van Veen over 8 years ago

  • Status changed from Open to Closed

#3 Updated by Jürgen Fischer over 7 years ago

  • Category set to Unknown

Also available in: Atom PDF