[postgis-users] Calculating variance of a set of points

Aren Cambre aren at arencambre.com
Sun Apr 24 17:42:11 PDT 2011


I have a table with events. Each event happened at a listed reference marker
on a highway, and it also has latitude and longitude as recorded by an
observer of the event.

There are many events at each reference marker.

I want to check the precision of the latitude and longitude for events
recorded at each reference marker. Roughly, I would collect
all latitude/longitude points at each reference marker, then I would want to
see the average distance between each point and a centroid of all the
points.

How would I do that with PostGIS?

I understand how to convert latitude/longitude to a geometry type, but I am
not clear how to do the rest without iterating through each point
individually.

Aren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110424/35475f06/attachment.html>


More information about the postgis-users mailing list