select st_centroid(st_collect(the_geom)) from thetable group by 
some_groupe_attribute if you want the centroid of all points you just leave the 
group-part. then it groups everything by default.
/Nicklas 
2009-06-12 Pedro Doria Meunier wrote:

-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Hi all,
>
>I'm trying to get the centroid of a list of points and I'm a bit
>unsure on how to proceed.
>The first thing that came to mind was converting the list of points to
>a polygon but that wouldn't always return a "clean" polygon (e.g.
>inner points) ...
>Any thoughts would be greatly appreciated :)
>
>BR,
>- --
>
>Pedro Doria Meunier
>GSM: +351 96 17 20 188
>Skype: pdoriam
> 
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.7 (GNU/Linux)
>Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
>iD8DBQFKMhor2FH5GXCfxAsRArnIAJ0cg/MJ148R+krJ9RscgH9saNA0ggCeIGiJ
>WF2SAplqMNijkZ8tXOFeP5w=
>=Db0b
>-----END PGP SIGNATURE-----
>
>_______________________________________________
>postgis-users mailing list
>[email protected]
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to