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

GRASS GIS trac at osgeo.org
Tue Nov 25 12:22:16 PST 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 glynn):

 Replying to [comment:3 sbl]:

 > At the end it is also a question wether NaN or Inf is preferable over
 NULL in the database...

 Well, for rasters, NaN is null (in 6.x, one specific NaN is treated as
 null, in 7.x any NaN value is treated as null). Also, code which is
 expecting a definite value probably won't handle a NaN correctly because
 of their unusual semantics.

 Ideally, infinities should be preserved rather than converted to an SQL
 NULL. If this is just a matter of fixing the int<->string conversions
 (rather than blindly using e.g. sprintf/sscanf "%f"), then it should be
 done.

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



More information about the grass-dev mailing list