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

GRASS GIS trac at osgeo.org
Tue Oct 25 12:17:55 PDT 2016

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

Comment (by mmetz):

 Replying to [comment:15 mlennert]:
 > Replying to [comment:14 mmetz]:
 > > Replying to [comment:13 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
 > > >
 > > > 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 :)
 > >
 > > This is a bugfix and should be backported to the G7 release branches.
 Too late for 7.2?
 > I would say no. We're just about to release RC1, so bugfixing is more
 than welcome. In addition, the fix will not change anything else outside
 of v.vect.stats and seems important enough to include.

 OK, applied to trunk, relbr72, and relbr70 in r69722-4.
 > I guess we would need some basic automatic tests to make sure that it
 doesn't modify other expected behavior ? ;-)

 I would wait for any new errors in the test suite. If other expected
 behaviour is no longer met, that expectation was wrong.

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

More information about the grass-dev mailing list