Bug report #9673

some polygons not labelled when layer's simplification is on

Added by Mathieu Pellerin - nIRV almost 9 years ago. Updated almost 9 years ago.

Assignee:Alvaro Huarte
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:18240


When simplification is activated for a given layer, labels might not be rendered for all of the layer's polygons. I'm attaching a simple shapefile that shows this issue.

Steps to reproduce:
1. Create an empty project and insert the province_2014 shapefile (polygon)
2. Make sure simplification is active for the added polygon layer
3. Open the labelling property window, and set the label to show PROV_NAME string column, and apply the settings
4. You'll notice three polygons (bottom left) are not labelled, for no visible reasons as the labels would not collide (see attached missing_labels.png)
5. Open the layer's property window, deactivate simplification, and apply; the missing labels will appear.

Alvaro, this might be a duplicate of issue #9655. If so, feel free to close this issue as duplicate of #9655.

provinces_2014.zip (1.13 MB) Mathieu Pellerin - nIRV, 2014-02-27 01:20 AM

missing_labels.png (234 KB) Mathieu Pellerin - nIRV, 2014-02-27 01:20 AM

Related issues

Related to QGIS Application - Bug report #9655: Strange behavior of labeling for multipolygons, due to ge... Closed 2014-02-25
Duplicated by QGIS Application - Bug report #9672: Failed to open Python console: UnicodeDecodeError in cons... Closed 2014-02-26


#1 Updated by Jürgen Fischer almost 9 years ago

  • Target version changed from Version 2.4 to Future Release - High Priority

#2 Updated by Alvaro Huarte almost 9 years ago

Hi Mathieu, I think this pull fixes the bug:

#3 Updated by Mathieu Pellerin - nIRV almost 9 years ago

Alvaro, great, will verify when the pull is committed to qgis master.

This should definitively be backported to a 2.2.X release, I've already heard users over in Cambodia complaining about mysterious label going missing. It's a known limitation that historically the QGIS PAL engine didn't put label on invalid geometry. But in this case, the users don't know simplification results in invalid geomtry, making it very hard to diagnose (i.e. running a ftool geometry validity run on layer won't reveal how simplification invalidates it).

#4 Updated by Larry Shaffer almost 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed
  • Category set to Labelling

Hi Mathieu,

Should be fixed with commit 245422a. Tested here on Mac OS X 10.7.5 and 10.9.2 with your test data. If not please reopen issue.

Also available in: Atom PDF