[Gvsig_english] field calculator 2nd: converting strings to numbers; field presettings

Brandt, Christian Christian.Brandt at zae-bayern.de
Tue Jul 1 15:35:33 CEST 2014


Dear Antonio,
thank you very much for your quick reply.
Following the procedure you suggested I get furthermore the error messages attached.
Do you have any ideas what happens there?

Kind regards
Christian




-----Ursprüngliche Nachricht-----
Von: gvsig_internacional-bounces at listserv.gva.es [mailto:gvsig_internacional-bounces at listserv.gva.es] Im Auftrag von Antonio Falciano
Gesendet: Dienstag, 1. Juli 2014 15:16
An: Users mailing list
Betreff: Re: [Gvsig_english] field calculator 2nd: converting strings to numbers; field presettings

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
_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at listserv.gva.es

To see the archives, edit your preferences or unsubscribe from this mailing list, please access this url:

http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error messages.pdf
Type: application/pdf
Size: 118302 bytes
Desc: error messages.pdf
Url : http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20140701/283664ec/attachment.pdf 


More information about the Gvsig_internacional mailing list