<html>
<head>
        <title></title>
        
<meta content="MSHTML 6.00.6000.16850" name="GENERATOR"></meta>
</head>

<body>select st_centroid(st_collect(the_geom)) from thetable group by some_groupe_attribute
        
<div align="left"> </div>
        
<div align="left">if you want the centroid of all points you just leave the group-part. then it groups everything by default.</div>
        
<div align="left"><br />
                /Nicklas</div>
        
<div align="left"> </div>
        
<div align="left"><br />
                2009-06-12 Pedro Doria Meunier wrote:<br />
                <br />
                -----BEGIN PGP SIGNED MESSAGE-----<br />
                >Hash: SHA1<br />
                ><br />
                >Hi all,<br />
                ><br />
                >I'm trying to get the centroid of a list of points and I'm a bit<br />
                >unsure on how to proceed.<br />
                >The first thing that came to mind was converting the list of points to<br />
                >a polygon but that wouldn't always return a "clean" polygon (e.g.<br />
                >inner points) ...<br />
                >Any thoughts would be greatly appreciated :)<br />
                ><br />
                >BR,<br />
                >- --<br />
                ><br />
                >Pedro Doria Meunier<br />
                >GSM: +351 96 17 20 188<br />
                >Skype: pdoriam<br />
                > <br />
                >-----BEGIN PGP SIGNATURE-----<br />
                >Version: GnuPG v1.4.7 (GNU/Linux)<br />
                >Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org<br />
                ><br />
                >iD8DBQFKMhor2FH5GXCfxAsRArnIAJ0cg/MJ148R+krJ9RscgH9saNA0ggCeIGiJ<br />
                >WF2SAplqMNijkZ8tXOFeP5w=<br />
                >=Db0b<br />
                >-----END PGP SIGNATURE-----<br />
                ><br />
                >_______________________________________________<br />
                >postgis-users mailing list<br />
                >postgis-users@postgis.refractions.net<br />
                >http://postgis.refractions.net/mailman/listinfo/postgis-users<br />
                ><br />
                ></div>
</body>
</html>