[GRASS-dev] [GRASS GIS] #2499: v.in.ogr in does not handle "nan" in attribute tables properly

#2499: v.in.ogr in does not handle "nan" in attribute tables properly
--------------------------+-----------------------------------------
  Reporter: sbl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.3
Component: Vector | Version: unspecified
Resolution: | Keywords: v.in.ogr, DBMI, SQLite, nan
       CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------------------

Comment (by sbl):

Here is how it was handeled in Pandas:
https://github.com/pandas-dev/pandas/pull/8208

As a simple example for reproduction (though not with v.net.centrality)
you could do:

{{{
db.execute sql="CREATE TABLE test (column double precision);"
db.execute sql="INSERT INTO test VALUES (-nan);"
# in contrast to
db.execute sql="INSERT INTO test VALUES (NULL);"
}}}

SQLite seems to have a workaround:
http://system.data.sqlite.org/index.html/tktview/e06c4caff3c433c80616ae5c6df63fc830825e59
But that does not seem to be available in default packages of SQLite and
other DBMIs seem to struggle With nan/NaN as well… So, this does not seem
to be trivial...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2499#comment:11&gt;
GRASS GIS <https://grass.osgeo.org>