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.<div><br></div><div>There are many events at each reference marker.<div>

<br></div><div>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.</div>

<div><br></div><div>How would I do that with PostGIS?</div><div><br></div><div>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.</div>

<div><br></div><div>Aren</div></div>