[GRASS-dev] [GRASS GIS] #2121: v.rast.stats: allow choice of statistics

GRASS GIS trac at osgeo.org
Wed Jan 15 05:25:43 PST 2014


#2121: v.rast.stats: allow choice of statistics
--------------------------+-------------------------------------------------
 Reporter:  mlennert      |       Owner:  grass-dev@…              
     Type:  enhancement   |      Status:  new                      
 Priority:  normal        |   Milestone:  7.0.0                    
Component:  Vector        |     Version:  svn-trunk                
 Keywords:  v.rast.stats  |    Platform:  Unspecified              
      Cpu:  Unspecified   |  
--------------------------+-------------------------------------------------

Comment(by lucadelu):

 Replying to [comment:4 mlennert]:

 >
 > This is great, thanks ! Just one problem: it fails at lines 255-256 with
 the dbf driver as colnames get truncated, but your variable names are
 full, and so
 >
 >
 > {{{
 > variable = colname.replace("%s_" % colprefix, '')
 > i = variables[variable]
 > }}}
 >
 > leads to a key error since 'variable' does not exist in 'variables'. A
 solution might be to use a dictionary linking variable names to colnames ?
 >

 Yes I fixed it using dictionary, try r58728 (it also solve another problem
 with DBF driver).

 >
 > Sounds reasonable to me.
 >

 I wait other dev's comments before make these changes

 > Moritz

 Luca

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



More information about the grass-dev mailing list