[Qgis-developer] Getting access to atlas record

Nyall Dawson nyall.dawson at gmail.com
Thu Jun 19 22:29:23 PDT 2014


On 20 June 2014 15:18, Martin Dobias <wonder.sk at gmail.com> wrote:

>
> May I suggest an alternative approach: to introduce dot notation, e.g.
> $atlasfeature.area_code - that looks much more like SQL syntax and it
> is easier to remember and use. It would require small adjustments to
> the parser and evaluator in order to support "nested" objects, but I
> think it would be worth it. I could help with that if needed.

What about evaluating a column name on the fly though? How could this
be handled? Maybe both ways should be supported...

>
> This would need some extra care: the expression tells in
> referencedColumns() call what fields are going to be used. If we
> support thing like this, we need to ensure that all attributes are
> fetched.

That's exactly why I held off on this for 2.4 -- I've had to introduce
a "usesAllColumns()" function to indicate that all columns are
required, not just those from the referencedColumns() list. This
requires changes to a wide scattering of code throughout QGIS to take
advantage of this, and not just rely on referencedColumns to determine
the subset to fetch.

Nyall


More information about the Qgis-developer mailing list