Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-25 Thread Markus Metz
Glynn Clements wrote: Markus Metz wrote: Please try the new addon v.centerpoint [0]. It calculates various center points for point clouds, lines, and areas. Standard options are the geometric mean (center of gravity) That's the arithmetic mean. The geometric mean of a set of N values is

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-24 Thread Glynn Clements
Markus Metz wrote: Please try the new addon v.centerpoint [0]. It calculates various center points for point clouds, lines, and areas. Standard options are the geometric mean (center of gravity) That's the arithmetic mean. The geometric mean of a set of N values is the Nth root of the

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-23 Thread Hamish
Hamish wrote: see also the v.points.cog addons script:    http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#v.points.cog although I haven't tried it for anything as big as lidar data. oops, I completely forgot to mention the r.cog addon script too:  

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-23 Thread Hamish
Moritz: Would be interesting to see results for big data. And AFAIK median is a bit more difficult to do in awk. I imagine that replacing the median by the mean in numpy is no problem (might be a flag to add to v.median). see the old r.univar.sh shell script for an idea of how to get a

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-23 Thread Moritz Lennert
On 22/09/13 17:06, Markus Metz wrote: Markus Neteler wrote: Hi, I came across this question: http://gis.stackexchange.com/questions/71734/how-to-calculate-mean-coordinates-from-big-point-datasets Please try the new addon v.centerpoint [0]. It calculates various center points for point

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-22 Thread Markus Metz
Markus Neteler wrote: Hi, I came across this question: http://gis.stackexchange.com/questions/71734/how-to-calculate-mean-coordinates-from-big-point-datasets Please try the new addon v.centerpoint [0]. It calculates various center points for point clouds, lines, and areas. Standard options

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-20 Thread Markus Metz
Glynn Clements wrote: Luca Delucchi wrote: maybe v.median [0] could help? Not for large datasets. First, it requires that the data will fit into RAM. Second, numpy.median() sorts the entire array and takes the middle value, which is somewhere between O(n.log(n)) for the typical case and

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-20 Thread Markus Metz
On Fri, Sep 20, 2013 at 5:38 PM, Markus Metz markus.metz.gisw...@gmail.com wrote: Glynn Clements wrote: Luca Delucchi wrote: maybe v.median [0] could help? Not for large datasets. First, it requires that the data will fit into RAM. Second, numpy.median() sorts the entire array and takes

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-19 Thread Moritz Lennert
On 18/09/13 16:24, Markus Metz wrote: On Wed, Sep 18, 2013 at 11:41 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 18/09/13 10:51, Luca Delucchi wrote: On 17 September 2013 22:10, Markus Netelernete...@osgeo.org wrote: Hi, I came across this question:

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-19 Thread Markus Metz
On Thu, Sep 19, 2013 at 9:15 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 18/09/13 16:24, Markus Metz wrote: Moritz Lennert wrote: Here's a little test: $time v.median in=elev_lid792_randpts 638648.50|220378.50 Should be 638648|220378. It seems that numpy gets the

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-19 Thread Markus Neteler
On Thu, Sep 19, 2013 at 2:32 PM, Markus Metz markus.metz.gisw...@gmail.com wrote: ... I am not sure. For areas without isles, there is a faster alternative. For areas with isles, the current approach is fast, but the centroids might be placed at somewhat unexpected locations (the next best

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-19 Thread Glynn Clements
Luca Delucchi wrote: maybe v.median [0] could help? Not for large datasets. First, it requires that the data will fit into RAM. Second, numpy.median() sorts the entire array and takes the middle value, which is somewhere between O(n.log(n)) for the typical case and O(n^2) for the worst case

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-18 Thread Moritz Lennert
On 18/09/13 00:10, Markus Neteler wrote: Hi, I came across this question: http://gis.stackexchange.com/questions/71734/how-to-calculate-mean-coordinates-from-big-point-datasets and wondered if this approach would be the fasted: # http://grass.osgeo.org/sampledata/north_carolina/points.las

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-18 Thread Luca Delucchi
On 17 September 2013 22:10, Markus Neteler nete...@osgeo.org wrote: Hi, I came across this question: http://gis.stackexchange.com/questions/71734/how-to-calculate-mean-coordinates-from-big-point-datasets and wondered if this approach would be the fasted: #

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-18 Thread Moritz Lennert
On 18/09/13 10:51, Luca Delucchi wrote: On 17 September 2013 22:10, Markus Netelernete...@osgeo.org wrote: Hi, I came across this question: http://gis.stackexchange.com/questions/71734/how-to-calculate-mean-coordinates-from-big-point-datasets and wondered if this approach would be the

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-18 Thread Markus Metz
On Wed, Sep 18, 2013 at 11:41 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 18/09/13 10:51, Luca Delucchi wrote: On 17 September 2013 22:10, Markus Netelernete...@osgeo.org wrote: Hi, I came across this question:

[GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-17 Thread Markus Neteler
Hi, I came across this question: http://gis.stackexchange.com/questions/71734/how-to-calculate-mean-coordinates-from-big-point-datasets and wondered if this approach would be the fasted: # http://grass.osgeo.org/sampledata/north_carolina/points.las v.in.lidar input=points.las

Re: [GRASS-dev] How to calculate mean coordinates from big point datasets?

2013-09-17 Thread Hamish
Markus Neteler wrote: I came across this question: http://gis.stackexchange.com/questions/71734/how-to-calculate-mean-coordinates-from-big-point-datasets so wants to find the average coordinate? and wondered if this approach would be the fasted: #