Faster than creating a multipoint is to recognize that ST_Centroid() is just going to return the center of the bbox of the collection anyways, so you can replace it with.
SELECT ST_Centroid(ST_Extent(point_geom)) FROM pb_statistics WHERE pg_debit =1; If you want to do it the hard way, then: SELECT ST_Centroid(ST_Collect(point_geom)) FROM pb_statistics WHERE pg_debit =1; P. On Mon, Sep 14, 2009 at 12:24 PM, Dustin Butler <[email protected]> wrote: > Hello, > > Trying to figure out how to find center using a collection of points. For > example something like this which doesn't work but you get the idea. > > SELECT ST_AsText(ST_Centriod(SELECT point_geom FROM pb.pb_statistics WHERE > pb_debit=1)); > > I think I need to make a multipoint geom out of the points and pass that but > haven't figure out yet. > > Thanks, > Dustin Butler > Intrcomm Technology > > Skype: dustinbutler > _______________________________________________ > 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
