Opened 10 years ago

Closed 5 years ago

## #942 closed enhancement (fixed)

# v.univar: please add support for geometry statistics

Reported by: | neteler | Owned by: | |
---|---|---|---|

Priority: | normal | Milestone: | 7.0.0 |

Component: | Default | Version: | svn-trunk |

Keywords: | vector, statistics | Cc: | |

CPU: | Unspecified | Platform: | Unspecified |

### Description

It would be great to have (via flag?) the possibility to generate the univar stats of x,y[,z] point geometry for analysing optimal random sampling, interpolation and such. Support for points might be sufficient for most cases. Perhaps heuristics are sufficient (like in the lidar tools in GRASS 7).

thanks, Markus

### Change History (3)

### comment:1 Changed 10 years ago by

### comment:2 Changed 6 years ago by

Does the following helps?

Pietro Zambelli in Object-based image classification in GRASS at grass-dev (nabble):

v.stats r58637 => Extract statistics from a vector map

(statistics about shape and about raster maps). v.stats internally use (in grass-addons):

- v.area.stats r58636 => extract some statistics about the shape (in grass-addons);
- v.to.rast => re-convert the vector to a raster map using the vector categories to be sure that there is a correspondence between vector and raster categories (zones).
- r.univar2 r58439 => extract some general statistics from raster using the zones (consume much less memory than r.univar, and compute more general statistics like: skewness, kurtosis, and mode (in grass-addons);

### comment:3 Changed 5 years ago by

Resolution: | → fixed |
---|---|

Status: | new → closed |

This got solved long time ago:

http://grass.osgeo.org/grass70/manuals/v.univar.html

-d Calculate geometry distances instead of table data

**Note:**See TracTickets for help on using tickets.

reallydumb and inefficient emergency workaround:etc

or just use v.out.ascii + awk. see this script for calc'ing the mean:

that script could probably get a flag to also output numbers for variance,stddev without too much work.

Hamish