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

GRASS GIS trac at osgeo.org
Tue Oct 25 00:04:44 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):

 Replying to [comment:12 mmetz]:
 > I have uploaded a patch (v_vect_stats_unique_cats_no_half.diff​) that
 correctly removes duplicate cats (similar to
 v_vect_stats_unique_cats.2.diff) and additionally eliminates the usage of
 half (adding 0.5 to the result). This half makes only sense if the result
 is to be converted to integer and if the result is a positive number. The
 result is always floating point, therefore adding 0.5 causes wrong
 results.

 Thanks Markus! I applied the patch and tested with Moritz's test data and
 examples, and also with my own data. Counts are fine and also stats :)

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



More information about the grass-dev mailing list