<div dir="ltr"><div><div>Thank you Andre!!<br><br>So, in Field Calculator [integer] / [Integer] = [integer]. Sorry, I didn't know it.<br><br>But now I understand that another way could be: "buf_metros"/111120.0 or, as you suggest: toreal("buff_metros")/111120 : difference is the decimal separator.<br>
<br></div>Greetings,<br><br></div>Carlos Cerdán<br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/1 Andre Joost <span dir="ltr"><<a href="mailto:andre+joost@nurfuerspam.de" target="_blank">andre+joost@nurfuerspam.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 01.10.2013 17:28, schrieb Carlos Cerdán:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Field calculator rounded to integer<br>
<br>
Hi list, developers specially<br>
<br>
I have an issue with a points layer: It has a real-double field with 6<br>
decimals that can't calculate decimals, just integers.<br>
<br>
For example in Field Calculator, I try to actualize the field "buf_grados"<br>
with field "buff_metros"/111120 [1] to estimate a distance in meters to<br>
degrees, but result is just integer (0.000000). If you divide per another<br>
minor number (eg 10), result is not zero, but just integer.<br>
<br>
</blockquote>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It's a bug?<br>
<br>
</blockquote>
<br>
For me, it works with QGIS 1.8.0 and 2.0.1.<br>
<br>
However, the buff_metros field is integer.So I used:<br>
<br>
toreal( "buff_metros" ) / 111120.0<br>
<br>
to have a division of real values.<br>
<br>
Greetings,<br>
André Joost<br>
<br>
<br>
______________________________<u></u>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-user</a><br>
</blockquote></div><br></div>