[GRASS-dev] [GRASS GIS] #2343: GRASS 7: "inf" values break insert statements in v.rast.stats

GRASS GIS trac at osgeo.org
Thu Jun 19 14:28:31 PDT 2014


#2343: GRASS 7: "inf" values break insert statements in v.rast.stats
--------------------------+-------------------------------------------------
 Reporter:  sbl           |       Owner:  grass-dev@…              
     Type:  defect        |      Status:  new                      
 Priority:  normal        |   Milestone:  7.0.0                    
Component:  Python        |     Version:  svn-releasebranch70      
 Keywords:  v.rast.stats  |    Platform:  All                      
      Cpu:  All           |  
--------------------------+-------------------------------------------------

Comment(by sbl):

 Replying to [comment:2 glynn]:
 > FWIW, PostgreSQL supports infinity and NaN values, e.g.
 > I don't know whether this is part of the SQL standard, or whether it is
 supported by the other back-ends. It won't work for columns of type
 NUMERIC.

 Thanks for the hint, I was not aware of that.

 Now I investigated a bit and it seems that SQLite (as default DBMI in
 GRASS 7) also supports NaN and Infinity. However, using quoted literal
 strings instead of NULL in v.rast.stas (regardless if it is "NaN", "inf",
 "Infinity", "INF" ...), always resulted in a value 0 in the attribute
 table (in my example at least). So, supporting NaN or Inf is unfortunately
 not as straightforward as I hoped...

 At the end it is also a question wether NaN or Inf is preferable over NULL
 in the database... (you can fnd a discussion about it in an SQLite user
 forum:
 https://groups.google.com/forum/#!msg/sqlite_users/aQX_WvVwBS8/Tqo_agM8_14J)

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2343#comment:3>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list