[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 02:55:40 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 lucadelu):

 Replying to [ticket:2343 sbl]:
 > When running v.rast.stats on a dataset with small geometries (which in
 my case were represented by 2 pixels in the raster), the parameter
 "coeff_var" can result in "inf" value.
 > "inf" breaks the INSERT statement and results in an DBMI error "no such
 column: inf", which at the end crashes v.rast.stats.
 >
 > Just like "nan", "inf" could be replaced by NULL. Changing line 263 in
 v.rast.stats.py into this:
 > if value.lower().endswith('nan') or value.lower().endswith('inf'):
 > should work.
 >
 > Both GRASS 7.0 and 7.1 are affected. Please find attached patches for
 both versions...

 Could you provide a dataset to test the patches?

 Thanks

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



More information about the grass-dev mailing list