Feature request #297
labels are missplaced
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Martin Dobias | ||
Category: | Map Canvas | ||
Pull Request or Patch supplied: | Resolution: | duplicate | |
Easy fix?: | No | Copied to github as #: | 10356 |
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
History
#1 Updated by Gavin Macaulay - about 18 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.
#2 Updated by Redmine Admin about 18 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
#3 Updated by Gavin Macaulay - about 18 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.
#4 Updated by Redmine Admin about 18 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
#5 Updated by anonymous - about 18 years ago
In OGC terms, it should be used PointOnSurface instead of Centroid.
#6 Updated by Tim Sutton over 17 years ago
Replying to [comment:4 [email protected]]:
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
#7 Updated by Jürgen Fischer almost 17 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.
#8 Updated by Maciej Sieczka - about 16 years ago
Could the patch by Jurgen be applied for 1.0?
#9 Updated by hamish - over 15 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
#10 Updated by Paolo Cavallini over 15 years ago
See also #54, of which this is essentially a duplicate
#11 Updated by luca76 - about 15 years ago
- Resolution set to duplicate
- Status changed from Open to Closed
closing, duplicate