[Qgis-developer] Ellipse renderer

Marco Hugentobler marco.hugentobler at sourcepole.ch
Tue Jul 19 11:09:24 EDT 2011


Hi Martin

> Right now there is no such possibility since the symbol layers were
> originally designed not to know anything about vector layers. Probably
> we should optionally pass QgsFieldMap or QgsVectorLayer to startRender
> method like we do in QgsFeatureRendererV2.

Sounds reasonable to pass the field map to the startRender method.
I've merged the ellipse renderer branch and will do discussed changes and the 
integration with the simple marker in a second step.

Regards,
Marco

Am Montag, 11. Juli 2011, 11.48:13 schrieb Martin Dobias:
> Hi Marco
> 
> >> One more technical issue: in the ellipse symbol layer you store
> >> indexes together with the field names. This is suboptimal and the
> >> field indexes should be resolved in startRender() method.
> > 
> > I agree, storing only the name would be more robust towards attribute
> > changes (e.g. storing projects, inserting fields into the db with
> > external programs, then reopen again).
> > Is there a way to resolve the indexes from within the symbol layer? Maybe
> > it's something obvious that I just don't see. The symbollayer needs to
> > know attribute name and index (name to say which attributes it needs,
> > index in renderPoint). However, it does not know the vectorlayer to get
> > the relation between name and index.
> 
> Right now there is no such possibility since the symbol layers were
> originally designed not to know anything about vector layers. Probably
> we should optionally pass QgsFieldMap or QgsVectorLayer to startRender
> method like we do in QgsFeatureRendererV2.
> 
> Martin


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list