[GRASS-dev] [GRASS GIS] #3184: v.vect.stats: errors in counts and statistics

GRASS GIS trac at osgeo.org
Wed Oct 19 13:20:13 PDT 2016


#3184: v.vect.stats: errors in counts and statistics
-------------------------+--------------------------
  Reporter:  veroandreo  |      Owner:  grass-dev@…
      Type:  defect      |     Status:  new
  Priority:  normal      |  Milestone:  7.2.0
 Component:  Vector      |    Version:  svn-trunk
Resolution:              |   Keywords:  v.vect.stats
       CPU:  x86-64      |   Platform:  Linux
-------------------------+--------------------------

Comment (by veroandreo):

 I applied the patch and tested.
 - For my data (615 points, 3600 areas split in 325 categories), I got
 Segmentation fault.
 - For the data generated with the commands you just posted, the result
 looks fine when running v.vect.stats with -p flag.

 {{{
 GRASS 7.3.svn (nc_spm_08_grass7):~ > v.vect.stats -p points=gc
 type=centroid areas=grid_one_cat points_col=col countcol=count
 statscol=sum method=sum
 Selecting points for each area...
  100%
 area_cat|count|sum
 1|9|18
 }}}

 However, if you remove that flag, to actually update the attribute table
 (which for this case it is supposed to have only one category), I get:

 {{{
 GRASS 7.3.svn (nc_spm_08_grass7):~ > v.db.select grid_one_cat
 cat|row|col|rown|coln|count|sum
 1|3|1|C|A|9|18
 2|3|2|C|B||
 3|3|3|C|C||
 4|2|1|B|A||
 5|2|2|B|B||
 6|2|3|B|C||
 7|1|1|A|A||
 8|1|2|A|B||
 9|1|3|A|C||
 }}}

 Is there something wrong with v.db.select or with v.edit? I followed all
 your steps. But even if I do {{{v.db.select grid_one_cat}}} before
 v.vect.stats (and after the v.edit step), I get all the old categories:

 {{{
 GRASS 7.3.svn (nc_spm_08_grass7):~ > v.db.select grid_one_cat
 cat|row|col|rown|coln
 1|3|1|C|A
 2|3|2|C|B
 3|3|3|C|C
 4|2|1|B|A
 5|2|2|B|B
 6|2|3|B|C
 7|1|1|A|A
 8|1|2|A|B
 9|1|3|A|C
 }}}

 I'm lost...

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



More information about the grass-dev mailing list