[Gvsig_english] field calculator 2nd: converting strings to numbers; field presettings
Antonio Falciano
afalciano at yahoo.it
Tue Jul 1 15:16:25 CEST 2014
Il 01/07/2014 13:43, Brandt, Christian ha scritto:
> Dear list,
> using the operator <toNumber> within the field calculator to convert as string defined numbers into double precision defined numbers resulted in error messages.
> Also if I define a new double precision field to write the string values in there bad messages occur.
> Can anybody help?
> I am currently using gvsig 1.12.
Hi Christian,
if you select a numeric field (integer or double), you can find the
command "toNumber" among those of Numeric type:
Information
Operator: toNumber(Parameter)
Parameter: String value
Returns: double_value
Description: Returns a new number initialized to the value represented
by the specified String
For instance, if we select the header of a double field called
"DoubleFld" in the table, this expression:
toNumber([StringFld])
will return a double value (integer or double, it depends by the field
you are calculating) in all (selected) records of "DoubleFld".
The same should happen for integer fields.
> Besides that, I am wondering if it is possible to preset the field lengths before exporting an .csv file to a .shp file.
You can manage the fields in the "Manage fields" dialog.
First you have to start editing, then open the table and finally choose
the "Table > Manage fields..." menu option.
Hope this helps your calculations!
Cheers,
Antonio
--
Antonio Falciano
http://www.linkedin.com/in/antoniofalciano
More information about the Gvsig_internacional
mailing list