[GRASS-dev] v.univar vs v.db.univar

Moritz Lennert mlennert at club.worldonline.be
Thu Jun 22 03:23:31 PDT 2017


On 22/06/17 11:43, Markus Metz wrote:
>
>
> On Thu, Jun 22, 2017 at 10:56 AM, Moritz Lennert
> <mlennert at club.worldonline.be <mailto:mlennert at club.worldonline.be>> wrote:
>>
>> On 21/06/17 23:12, Markus Neteler wrote:
>>>
>>> On Wed, Jun 21, 2017 at 10:19 PM, Markus Metz
>>> <markus.metz.giswork at gmail.com
> <mailto:markus.metz.giswork at gmail.com>> wrote:
>>> ...
>>>>
>>>> v.univar can also compute statistics on the distances between vector
>>>> geometries. There is no explanation in the manual what this should
> be good
>>>> for. Markus N, you wanted this feature many years ago, do you
> remember why?
>>>
>>>
>>> I found this related ticket:
>>> https://trac.osgeo.org/grass/ticket/942
>>>
>>> Checking further, I found a personal wish email to MartinL from 2009.
>>> AFAIR I was dealing with LiDAR point clouds of the Trentino back
>>> then... and needed to know the average distance between points
>
> Did you really want to average distance to all other points or rather
> the average distance to the nearest other point?
>
>>> in
>>> order to optimize raster binning (meanwhile I would probably use
>>> r.in.xyz <http://r.in.xyz> and count the points falling into each
> raster cell, then
>>> r.univar on the resulting map).
>>>
>>> However, to have the possibility to compute statistics on the
>>> distances between vector (point) geometries makes sense to me in a
>>> GIS.
>>
>>
>> Would this possibly be better done within v.distance ? Something like
> a -s flag meaning "Output summary statistics of desired information"
> which would take the info chosen in upload=, and possibly the -a flag
> and calculated summary statistics ?
>
> v.distance uses the distance to the nearest feature while v.univar uses
> all distances to all other features.

v.distance -a also provides this.

> While v.distance makes sense to me,
> v.univar's distances to all other features do not make sense to me.

Although, I don't have a specific use case at this stage, I do think 
that these can be a potentially interesting variables to geometrically 
characterize a layer, for example a point layer for which this would be 
a measure of general dispersal, especially when looking not only at the 
average.

Moritz


More information about the grass-dev mailing list