Feature request #297

labels are missplaced

Added by Redmine Admin almost 8 years ago. Updated about 5 years ago.

Status:Closed Start Date:
Priority:Low Due date:
Assigned to:Martin Dobias % Done:

0%

Category:Map Canvas
Target version:Version 1.0.3
Platform:All Resolution:duplicate
Platform version: Patch supplied:
Status info:0 Tag:

Description

See the screendump. There are labels 1246, 799 and 1205 in the center. Can you see them? Good.

The problem is that 1246 belongs to the selected, yellow-highlighted polygon, 799 to the greyish polygon and 1205 to the greenish one. But the way they are displayed, you wouldn't guess that they are. Zooming or playing with label positioning doesn't fix the problem. The 1246 is worst.

This is not a separated case - it is a common bug when displaying narrow, long polygons.

Maciek

labels_bad.png (53.9 kB) Redmine Admin, 09/22/2006 03:43 pm

bug297fix.diff (6.6 kB) Jürgen Fischer, 12/10/2007 01:40 pm

History

Updated by Gavin Macaulay - almost 8 years ago

Qgis currently displays polygon and linestring labels at the position given by the mean of the points that define the polygon or linestring. Label 1246 looks to be in the appropriate place under that scheme.

More intelligent placing of labels is something that we are planning for later releases of qgis. In the meantime, it is possible to use the 'Data defined position' abilities of the label dialog box to use data in your data source to place labels.

See ticket #54 for some other wishes to do with labels.

Updated by Redmine Admin almost 8 years ago

Maybe I don't get something, but the way I understand what you are saying means that the 1246 should be somewhere within the the polygon it belongs to, ie. the yellow-highlited one? But it's not, as yuo can see - it's way under that polygon. This is the main problem.

Maciek

Updated by Gavin Macaulay - almost 8 years ago

An example - if you have a polygon that is similar to your highlighted one where it is a u shape. The mean of all of the points that make up the polygon will be somewhere in the middle of the u, and not necessarily inside the polygon boundaries.

Updated by Redmine Admin almost 8 years ago

Thanks, now I get it.

In that case, I consider it a serious defect than convex shapes are labelled wrong "by design". I find it strange it's not planned to be fixed for 0.8 and that you consider it an "ehnacement".

Maciek

Updated by anonymous - almost 8 years ago

In OGC terms, it should be used PointOnSurface instead of Centroid.

Updated by Tim Sutton about 7 years ago

Replying to [comment:4 ]:

Thanks, now I get it.

In that case, I consider it a serious defect than convex shapes are labelled wrong "by design". I find it strange it's not planned to be fixed for 0.8 and that you consider it an "ehnacement".

Maciek

Hi

We can only plan work if there is someone willing, available and able to do the work. Martn Dobias is planning to redo the labelling implementation at some stage, and until that time we only offer the simple centrod based labelling as currently available in QGIS. For 0.9 we will still have teh current labelling implementation so I am shifting this bug report over to 1.0. I'm leaving its status as 'Major' though since I do agree that its something we should try to resolve before the final QGIS Stable Version 1.0 release

Regards

Tim

Updated by Jürgen Fischer over 6 years ago

fix in attached patch. Use GEOS's getInteriorPoint to determine label points. This is an configurable options as it has a large performance impact.

Updated by Maciej Sieczka - almost 6 years ago

Could the patch by Jurgen be applied for 1.0?

Updated by hamish - over 5 years ago

Hi,

just to note that the project "Label placement for Quantum GIS" by Martin Dobias has been accepted for the 2009 Google Summer of Code.

see http://www.osgeo.org/node/895

Hamish

Updated by Paolo Cavallini about 5 years ago

See also #54, of which this is essentially a duplicate

Updated by luca76 - about 5 years ago

  • Status changed from Open to Closed
  • Resolution set to duplicate

closing, duplicate

Also available in: Atom PDF