[Qgis-user] Field calculator rounded to integer

Andre Joost andre+joost at nurfuerspam.de
Tue Oct 1 09:39:42 PDT 2013


Am 01.10.2013 17:28, schrieb Carlos Cerdán:
> Field calculator rounded to integer
>
> Hi list, developers specially
>
> I have an issue with a points layer: It has a real-double field with 6
> decimals that can't calculate decimals, just integers.
>
> For example in Field Calculator, I try to actualize the field "buf_grados"
> with field "buff_metros"/111120 [1] to estimate a distance in meters to
> degrees, but result is just integer (0.000000). If you divide per another
> minor number (eg 10), result is not zero, but just integer.
>

>
> It's a bug?
>

For me, it works with QGIS 1.8.0 and 2.0.1.

However, the buff_metros field is integer.So I used:

toreal( "buff_metros" ) / 111120.0

to have a division of real values.

Greetings,
André Joost





More information about the Qgis-user mailing list