v.in.ascii support for IEEE fp nan, inf
|Reported by:||hamish||Owned by:|
Issue migrated here from the old RT bug system # 2763, and trac #198.
Fri, Dec 3 2004 Hamish wrote:
I want to input "nan" into a double precision column, it complains "column foo defined as double has string values"
'nan' and 'inf' are valid IEEE float/double values;
scanf "%f" reads them, etc.
Added to my TODO > 6.0
please try 'NULL' instead of 'nan'.
doesn't work. turns the column into string even if defined as double with columns=
nan, inf are valid float/double values and should be scanned as such from incoming raw float data. AFAIK sscanf does read it as a valid %f.
My current work around is:
sed -e 's/nang'
Jul 8 2006 Markus suggested: if(column= type is specified as double prec)
G_str_replace(incoming line, "nan", "");
but it would be good to also catch "inf", "NaN", and perhaps "NULL".