Opened 18 years ago
Closed 15 years ago
#297 closed enhancement (duplicate)
labels are missplaced
Reported by: | Owned by: | wonder | |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.0.3 |
Component: | MapCanvas | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | Yes | Platform: | All |
Platform Version: | Awaiting user input: | no |
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
Attachments (2)
Change History (13)
by , 18 years ago
Attachment: | labels_bad.png added |
---|
comment:1 by , 18 years ago
Milestone: | Version 0.8 Release → Version 0.9 Release |
---|---|
Type: | bug → enhancement |
comment:2 by , 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
comment:3 by , 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.
follow-up: 6 comment:4 by , 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
comment:6 by , 17 years ago
Awaiting user input: | unset |
---|---|
Milestone: | Version 0.9 → Version 1.0 |
Must Fix for Release: | → No |
Replying to tutey@o2.pl:
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
comment:7 by , 16 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.
by , 16 years ago
Attachment: | bug297fix.diff added |
---|
comment:8 by , 16 years ago
Must Fix for Release: | No → Yes |
---|---|
Platform: | Linux → All |
Platform Version: | Ubuntu Dapper |
Could the patch by Jurgen be applied for 1.0?
comment:9 by , 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
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.