Opened 14 years ago

Last modified 9 years ago

#1346 new enhancement

v.in.ascii support for IEEE fp nan, inf

Reported by: hamish Owned by: grass-dev@…
Priority: minor Milestone: 6.4.6
Component: Vector Version: svn-trunk
Keywords: v.in.ascii Cc:
CPU: All Platform: All

Description

Issue migrated here from the old RT bug system # 2763, and trac #198.

http://intevation.de/rt/webrt?serial_num=2763

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.

Radim replied:

Added to my TODO > 6.0

Markus:

please try 'NULL' instead of 'nan'.

doesn't work. turns the column into string even if defined as double with columns=

H:

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".

Hamish

Change History (1)

comment:1 by neteler, 9 years ago

Milestone: 6.4.26.4.6
Note: See TracTickets for help on using tickets.