[postgis-users] Calculate variance of a multipoint
Aren Cambre
aren at arencambre.com
Wed May 4 12:12:22 PDT 2011
The more I think about it, is this a job for R? I know I need to start using
R at some point, just haven't begun yet.
Aren
On Wed, May 4, 2011 at 1:42 PM, Aren Cambre <aren at arencambre.com> wrote:
> Suppose you have a geometry type with a multipoint. How would you calculate
> the variance of the points in that multipoint?
>
> I looked through the PostGIS 1.5 function reference and am not coming up
> with any easy way.
>
> A hard way seems to be using st_centroid(multipoint) to find the
> multipoint's center. From there, I can calculate the distance of each point
> from its center, and use that towards calculating the variance (each
> distance is squared, all squared distances are added together, then divide
> by number of points).
>
> I guess my ultimate need is to measure relative dispersion of multipoints.
> The multipoints that have the most dispersion are suspect, but I need a way
> of identifying which ones are like this.
>
> Aren
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110504/cbd509b7/attachment.html>
More information about the postgis-users
mailing list