[GRASS-dev] [GRASS GIS] #3504: v.rast.stats: add "mode" and "diversity" to methods

#3504: v.rast.stats: add "mode" and "diversity" to methods
--------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-trunk
Keywords: v.rast.stats | CPU: Unspecified
Platform: Unspecified |
--------------------------+-------------------------
Currently, if one needs to extract mode and diversity statistics from a
Land Cover raster map for polygons in a vector map, polygons need to be
converted to raster format, then use G7:r.statistics (which seems to be
the only module providing mode) and then query r.statistics' output
raster(s) with v.rast.stats again. If v.rast.stats would provide these
basic info, the workflow would be very much simplified.

Would it be possible to add mode and diversity to the methods available in
G7:v.rast.stats?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3504&gt;
GRASS GIS <https://grass.osgeo.org>

#3504: v.rast.stats: add "mode" and "diversity" to methods
--------------------------+--------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-trunk
Resolution: | Keywords: v.rast.stats
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------

Comment (by annakrat):

Not that it would probably help here, but there is r.mode module.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3504#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3504: v.rast.stats: add "mode" and "diversity" to methods
--------------------------+--------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-trunk
Resolution: | Keywords: v.rast.stats
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------

Comment (by veroandreo):

Replying to [comment:1 annakrat]:
> Not that it would probably help here, but there is r.mode module.

Yes, you are right. But using r.mode for this case does not make any
difference, it would be the same than using r.statistics. I need to query
a LC map with a polygon vector map and get the mode and diversity in the
attribute table of the vector map.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3504#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>