[Qgis-user] Is there a way to calculate a devision in Sextante Field Calculator for QGIS 1.8?

Anita Graser anitagraser at gmx.at
Thu Jan 17 02:01:38 PST 2013


Thanks, there are indeed features with a 0 value. But I think I tried
with selecting only those where there would be no division by zero and
then told field calculator to use this selection. Will give it another
try ...

Thanks,
Anita



On Thu, Jan 17, 2013 at 10:16 AM, Victor Olaya <volayaf at gmail.com> wrote:
> hmmmm,, if that also causes the error, maybe you have a 0 value on the bFIELD?
>
> The error message is the same if there is any error, so it might not
> be in the formula but in the values. I should make that more verbose,
> so it tells exactly what happens
>
> My guess is that you have some 0 value that cannot be used in a
> division...but I might be wrong :-)
>
> Cheers
>
> Victor
>
>
> 2013/1/17 Anita Graser <anitagraser at gmx.at>:
>> Hi Victor,
>>
>>  Thanks for the feedback.
>>
>>  aFIELD * (bFIELD**-1) causes the same error.
>>
>>  I'm currently testing on Ubuntu and can try on Windows later. The
>>  "normal" Field Calculator outside Sextante works well.
>>
>>  Thanks,
>>  Anita
>>
>> On Thu, Jan 17, 2013 at 9:27 AM, Victor Olaya <volayaf at gmail.com> wrote:
>>> I have just tried with both versions and the division works without problem...
>>>
>>> It is weird that you can substract the values but not divide them.
>>>
>>> You can try to express aFIELD / bFIELD as aFIELD * (bFIELD**-1)  Maybe
>>> that works
>>>
>>> Hope this helps. I will have a detailed look at the calculator to see
>>> if I can reproduce that error. It happens only in the modeler or
>>> everywhere?
>>>
>>>
>>> Regards
>>>
>>> Victor
>>>
>>>
>>> 2013/1/17 Anita Graser <anitagraser at gmx.at>:
>>>> Hi,
>>>>
>>>> I'm running QGIS 1.8 with Sextante 1.0.8. In one of my models, I want
>>>> to calculate a devision: aFIELD / bFIELD but there is always the same
>>>> error: Problem evalutaion formula: Wrong field values or formula.
>>>> (Note: aFIELD - bFIELD does work!) Is there a workaround for the
>>>> release version? (I assume it works in the current dev version.)
>>>>
>>>> Thanks
>>>> Anita
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list