[Qgis-user] Field calculator QGIS2.4 division error
Ivan Santiago
isantiago at ogp.pr.gov
Fri Aug 22 13:04:58 PDT 2014
Hello all:
Thanks Ralf.
The columns used are integer. The resulting column is real, lenght=10 precision=1
Writing "HC01_VC04" / "HC01_VC03" * 100.0
Does not work either.
Applying convert function toreal() to one of the columns, produces correct results. I checked it against LibreOffice Calc.
BTW:
The calculator has a strange behavior though. I need to sort and sort again the calculated column to 'refresh' the table values.
QGIS 2.4 32bit under WIN7.
---------------------------
Iván Santiago
GIS Specialist
Information Technologies
Office of Management and Budget
787.725.9420 x 2378
Calle Cruz 254
PO Box 9023228
San Juan, PR 00902-3228
http://gis.pr.gov<http://gis.pr.gov/>
From: Ivan Santiago
Sent: Thursday, August 21, 2014 4:04 PM
To: 'qgis-user at lists.osgeo.org'
Subject: RE: Field calculator QGIS2.4 division error
Hello all:
Does anyone have had problems with field calculations using the division operator?
I've tried many times to update a new field using both the old field calculator and the new interface but they just don't work with division.
Simple operations like:
"HC01_VC04" / "HC01_VC03" * 100
Do not work.
The only workaround I found was to put the function abs into the denominator:
"HC01_VC04" / abs("HC01_VC03") * 100
Then it gives the result but this should be avoidable.
I'll send the table used if anyone want to try it.
Qgis version is 2.4 (32bit) under WIN7.
---------------------------
Iván Santiago
GIS Specialist
Information Technologies
Office of Management and Budget
787.725.9420 x 2378
Calle Cruz 254
PO Box 9023228
San Juan, PR 00902-3228
http://gis.pr.gov<http://gis.pr.gov/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140822/4155dd6b/attachment.html>
More information about the Qgis-user
mailing list