Bug report #2949

Labeling (ABC) to a shape file do not show content from dbf field, for objects whose geometry in not valid (checked whith ftools)

Added by Gerhard Spieles about 9 years ago. Updated about 5 years ago.

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

Description

Hello,

i have exported an amount of datas and geometries fom a cemetry programm to a shape file. Unfortunately, is in a standard geometry of the cemetry programm a line intersection fault (checked by ftools).
Labeling (ABC) dont functions with these objects.

Is it possible, to label all objects, even the geometry is not full correct.

test1.jpg (237 KB) Gerhard Spieles, 2012-09-17 09:34 AM

test2.jpg (214 KB) Gerhard Spieles, 2012-09-17 09:34 AM

History

#1 Updated by Paolo Cavallini almost 8 years ago

  • Category changed from Symbology to Labelling
  • Assignee deleted (nobody -)
  • Pull Request or Patch supplied set to No

#2 Updated by Giovanni Manghi almost 8 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#3 Updated by Paolo Cavallini over 7 years ago

  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master

#4 Updated by Paolo Cavallini about 7 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#5 Updated by Giovanni Manghi about 7 years ago

  • Resolution set to fixed
  • Status info deleted (0)
  • OS version deleted (xp sp3)
  • Operating System deleted (Windows)
  • Status changed from Open to Closed

At least with the latest changes in the labelling code this seems fixed. Reopen if necessary, but attach sample data.

#6 Updated by Gerhard Spieles about 7 years ago

Hello,
have tested the labeling in polygons with intersection fault.
Labeling is correct in section advanced, Placement: "Offset from centroid" and "around centroid" (see attached test1.jpg)
Label dissapears in section advanced, Placement: "horizontal", "free" and "using perimeter" (see attached test2.jpg)

Gerhard

#7 Updated by Larry Shaffer about 7 years ago

  • Resolution deleted (fixed)
  • Priority changed from Low to Normal

See also #4079-23 and

http://osgeo-org.1560.n6.nabble.com/Add-ST-MakeValid-functionality-to-QgsGeometry-td5002449.html

and #3517-10 for an explanation on why "horizontal", "free" and "using perimeter" are not showing labels for those invalid geometries, but "offset" and "around" are.

#8 Updated by Gerhard Spieles about 7 years ago

Hello,
just tested the datas with intersection fault in QGis master 4b263d6.
No labels to see in any option.
Gerhard

#9 Updated by Larry Shaffer about 7 years ago

  • Status changed from Reopened to Feedback

gespiel - wrote:

Hello,
just tested the datas with intersection fault in QGis master 4b263d6.
No labels to see in any option.
Gerhard

Gerhard, thank you for the report. Unfortunately, that is correct behavior for now.

With the recent commit
4d9d16dab3b9fc686873426108b509fc399fb8ba

the fix for showing labels for some invalid geometries for "offset" and "around" placements has been reverted, in favor of a corrected centroid calculation within the PAL engine. This allows for mulit-part features to be properly labeled (as before). It is possible to instead use a GEOS-based centroid calculation within PAL, but this will not fix the issue with "horizontal", "free" and "using perimeter" placements not showing labels for all invalid geometries.

Basically, this will remain 'broken' (i.e. invalid geometries showing no labels) until a more general fix for invalid geometries can be implemented, prior to a geometry being sent into the PAL engine. This would be the appropriate approach to fix this issue for all PAL operations (where possible, since some invalid geometries may not be 'fixable').

At this point, this is the most likely candidate:
http://osgeo-org.1560.n6.nabble.com/Add-ST-MakeValid-functionality-to-QgsGeometry-td5002449.html

#10 Updated by Giovanni Manghi about 7 years ago

Basically, this will remain 'broken' (i.e. invalid geometries showing no labels)

I personally would not consider this behavior as broken, a tool to fix geometries is surely needed, but anyway I vote to close this ticket. Agree?

At this point, this is the most likely candidate:
http://osgeo-org.1560.n6.nabble.com/Add-ST-MakeValid-functionality-to-QgsGeometry-td5002449.html

#11 Updated by Regis Haubourg almost 7 years ago

agreed for me since we keep on discussing it elsewhere.

#12 Updated by maning sambale over 6 years ago

Propose for closing.

#13 Updated by Paolo Cavallini over 5 years ago

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

#14 Updated by Giovanni Manghi about 5 years ago

  • Status changed from Feedback to Closed
  • Resolution set to worksforme

there have been work on geometry validity/labels, and from my tests on master now labels are ok also on invalid geometries.

Please reopen if necessary.

Also available in: Atom PDF