[postgis-users] Centroid out a list of points
Pedro Doria Meunier
pdoria at netmadeira.com
Fri Jun 12 02:34:21 PDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thank you Nicklas for your advice! That actually accomplishes it with
a notable exception:
Altough the table has a gist index on the geom column the query is
always executed in Seq Scan mode...
I ask the gurus which fx is causing this, st_centroid or st_collect ?
BR,
Pedro Doria Meunier
GSM: +351 96 17 20 188
Skype: pdoriam
nicklas.aven at jordogskog.no wrote:
> 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
>>
>>
>
> ----------------------------------------------------------------------
>
>
> _______________________________________________ postgis-users
> mailing list postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFKMiET2FH5GXCfxAsRAur7AJ9Q3PoL+onFAg+iUe0BHVNBXEPH6wCfVrOA
8nbOSB5ZFfPFFaiRLoNRED8=
=8LBq
-----END PGP SIGNATURE-----
More information about the postgis-users
mailing list