[Qgis-developer] Re : problem with 'toreal' in field calculator
Junior
delazj at gmail.com
Tue Mar 10 11:51:40 PDT 2015
Destination field matters. While the destination field has numeric type, and values can of course be converted to numbers then conversion will succeed and values will be numerically typed.
Envoyé depuis mon HTC
----- Reply message -----
De : "Matteo Ghetta" <matteo.ghetta at gmail.com>
Pour : "Junior Delaz" <delazj at gmail.com>
Cc : "qgis-developer" <qgis-developer at lists.osgeo.org>
Objet : [Qgis-developer] problem with 'toreal' in field calculator
Date : mar., mars 10, 2015 18:29
Hi Junior,
thanks, get it. So numeric conversion are sinful only between numeric fields right?
Cheers
Matteo
2015-03-10 18:25 GMT+01:00 Junior Delaz <delazj at gmail.com>:
hi,
If your field is recognized by QGIS as a string one, trying to overwrite its values type will fail as they are intended to be string in THIS field. This is why when you create a new numeric field and make conversion, it's ok (this new field expect numeric values, so it'll recognize your conversion).
2015-03-10 18:08 GMT+01:00 Matteo Ghetta <matteo.ghetta at gmail.com>:
Hi all,
I have a filed made up by numeric values but recognized as text (should be a WFS issue and not a QGIS problem).
I've used the 'toreal' function of the field calculator in order to update the field but nothing changed (numbers are still read as text).
Strange is that if I create a new field using the 'toreal' function, values are correctly read as numbers and not as text.
Am I missing something or can be a bug?
BTW: debian testing and QGIS 2.8.1
Cheers
Matteo
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150310/4ecea69a/attachment.html>
More information about the Qgis-developer
mailing list