[postgis-users] Centroid out a list of points

nicklas.aven at jordogskog.no nicklas.aven at jordogskog.no
Fri Jun 12 02:22:59 PDT 2009


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
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090612/3e65c741/attachment.html>


More information about the postgis-users mailing list