[Qgis-developer] Expression Builder Questions

Nathan Woodrow madmanwoo at gmail.com
Tue Jul 24 06:38:57 PDT 2012


Martin and I did talk about this but we decided in order to allow full
control over the syntax we should have our own.  My ultimate plan is
to have Python support any where  QgsExpression is used currently,
labelling, rule based rendering, etc.  Using Python would allow you to
use the full power of Python with full PyQGIS and PyQt support.  That
is the plan anyway, no ETA at the moment.

- Nathan

On Tue, Jul 24, 2012 at 11:34 PM, Etienne Tourigny
<etourigny.dev at gmail.com> wrote:
> Sort of a little late in the discussion - but would it be possible to
> use an external parser so that most mathematical functions would be
> supported?
>
> Etienne
>
> On Tue, Jul 24, 2012 at 10:31 AM, leyan ouyang <ouyang.leyan at hotmail.com> wrote:
>> For the rounding issue: as a workaround, you can do some ugly things like
>> toreal( toint( X * 100)) / 100
>>
>> Leyan
>>
>>> Date: Tue, 24 Jul 2012 13:43:45 +0200
>>> From: a.neumann at carto.net
>>> To: madmanwoo at gmail.com
>>> CC: qgis-developer at lists.osgeo.org
>>> Subject: Re: [Qgis-developer] Expression Builder Questions
>>
>>>
>>> Hi Nathan,
>>>
>>> Thanks for the reply.
>>>
>>> It is not so urgent for me - and I agree that the scale issue would be
>>> better solved with rule-based labeling.
>>>
>>> Andreas
>>>
>>> On Tue, 24 Jul 2012 20:46:54 +1000, Nathan Woodrow wrote:
>>> > Hey Andreas,
>>> >
>>> > On Tue, Jul 24, 2012 at 5:21 PM, Andreas Neumann
>>> > <a.neumann at carto.net> wrote:
>>> >> Hi all - esp. Nathan ;-),
>>> >>
>>> >> I have a couple of questions regarding the expression builder:
>>> >>
>>> >> 1. Would it be possible to add a $scale support which we could
>>> >> combine with
>>> >> CASE ? This would be quite powerful to add condiditional labeling
>>> >> depending
>>> >> on scale ranges.
>>> >
>>> > Possible yes, however I would like to see proper rule based
>>> > labelling,
>>> > like the rule based rendering, implemented instead as that would
>>> > achieve the same thing but with more power.
>>> >
>>> >>
>>> >> 2. Is there a rounding function available other than toint() ? I
>>> >> envision
>>> >> something like PostgreSQL round function:
>>> >> http://www.postgresql.org/docs/9.1/interactive/functions-math.html
>>> >> where one
>>> >> can specify the number of digits one wants to round to.
>>> >
>>> > Yeah this can be done. I'll add it once I get some free time.
>>> >
>>> >>
>>> >> 3. Is there a string formatting function available that allows to
>>> >> format
>>> >> longer nunmbers for better readability? E.g. 1000000.00 would become
>>> >> 1'000'000.00
>>> >
>>> > Sure this is doable as well. I'll have a look into it.
>>> >
>>> > Anyone else is free to have a go if they already know how, I'm pretty
>>> > busy at the moment so no ETA on the above functions.
>>> >
>>> > Regards,
>>> > Nathan
>>>
>>> --
>>> --
>>> Andreas Neumann
>>> Böschacherstrasse 10A
>>> 8624 Grüt (Gossau ZH)
>>> Switzerland
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list