[Qgis-developer] How should work the placement "over" on adv-label

Sandro Santilli strk at keybit.net
Tue Oct 4 03:14:27 EDT 2011


On Mon, Oct 03, 2011 at 10:38:54PM +0200, Andrea Peri wrote:
> Hi,
> 
> I have a situation of polygon like this:
> 
>   -----------------
>   |         A      |
>   |                |
>   |   --------     |
>   |  |  B     |    |
>   |  |        |    |
>   |  |        |    |
>   |  |        |    |
>   |  |        |    |
>   |   --------     |
>   |                |
>   -----------------
> 
> Where the poly A has a hole and the poly-B fill exactly the hole of poly-A
> 
> I need to have a labeling like this:
> 
>   -----------------
>   |       value1   |
>   |                |
>   |   --------     |
>   |  |        |    |
>   |  |        |    |
>   |  | value2 |    |
>   |  |        |    |
>   |  |        |    |
>   |   --------     |
>   |                |
>   -----------------
> 
> I try with the label-advanced plugin and use the option Placement "Over".
> 
> But it produce instead this situation:
> 
>   -----------------
>   |                |
>   |                |
>   |   --------     |
>   |  | value1 |    |
>   |  |        |    |
>   |  | value2 |    |
>   |  |        |    |
>   |  |        |    |
>   |   --------     |
>   |                |
>   -----------------
> 
> I don't know if this is a wanted result or not for the "over" placement.
> But I guess this is not the better solution , because don't allow to
> understand what is the label
> of PolyA and the label of PolyB.

Recently someone committed a fix for labeling that used GEOS intersection
to avoid scanning too many segments for candidates. Since GEOS is involved
already, it could as well be used for GEOSPointOnSurface on the intersection
between the polygon and the viewport. That will give you what you want.

Sounds like worth a ticket on the tracker.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the Qgis-developer mailing list