[Qgis-developer] Bringing diagrams into labeling-ng

Martin Dobias wonder.sk at gmail.com
Wed Feb 16 05:04:29 EST 2011


On Wed, Feb 16, 2011 at 8:56 AM, Marco Hugentobler
<marco.hugentobler at sourcepole.ch> wrote:
> Hi Martin, Paolo, Tim
>
>> - what will happen to the vector overlays? will that be deprecated or
>> kept? (AFAIK the vector overlay stuff is used just by the diagrams
>> plugin, so it might be a good idea to integrate diagrams directly to
>> PAL so simplify the whole post-rendering routine).
>
> Yes, the idea is to deprecate the vector overlays and to integrate the
> diagrams into QgsPalLabeling.
>
>> - what would be the impact on the labeling itself?
>
> Looking deeper into the code yesterday, I changed my mind and decided to leave
> QgsPalGeometry as it is. For the moment, I'm just planning to add pointer(s)
> to the diagram rendering classes to QgsPalLayerSettings and to add some
> settings parameters. That would mean no impact on the labeling itself.

That sounds good, +1 for me.


>> it would be nice to be able to
>>interactively place the diagrams as you have done with labels. How
>>would the diagram's placement be persisted? In the same way as labels
>>using a specified columns? Some users have requested that label
>>placement could work like E$RI where the labels can be turned into
>>graphics and placement is stored in the project file (or whatever the
>>ESRI equivalent of that is) - so that you don't
>
> The placement would be the same as for labels (stored in columns). The option
> to change the objects to graphics would be nice. Technically, it could
> probably be done by turning the labels into annotation objects
> (QgsTextAnnotation). However, this is out of scope for me at the moment.

I think the labels/diagrams do not have to be converted to graphics,
since that might complicate their connection with the layer and the
automatic placement (e.g. if the label text field is modified or the
placement should be recalculated because of changes in the layer).

I share Tim's opinion opinion that in future it would be good to allow
to save the placement in project file (or maybe an independent file).
While keeping the placement information in layer attributes might be
convenient for some (as commented in follow up mail from Andreas), it
has some difficulties, too:
- if a layer is used in various independent projects, the labeling
requirements might be different for each of them
- it's not very user friendly if the users need to manually add new
attributes to the layer, assign them to labeling and learn what values
to put there
- the approach using attributes is not that flexible: things like
curved labels or any custom labeling properties would be rather hard
to represent in layer's attributes

Martin


More information about the Qgis-developer mailing list