[postgis-users] MBR from a collection of points?
Paul moen
pmoen at offroadsoftware.com
Mon Jan 25 08:24:39 PST 2010
select st_xmin(st_envelope(st_union(the_geom))) as
minx,st_xmax(st_envelope(st_union(the_geom))) as
maxx,st_ymin(st_envelope(st_union(the_geom))) as miny,
st_ymax(st_envelope(st_union(the_geom))) as maxy from cemeteries
would give you the minx,maxx,miny and maxy
On Jan 25, 2010, at 10:09 AM, Robert Hicks wrote:
> Hey all, I have a collection of points stored in Postgres and I want
> to extract the geom from each row and aggregate each one together to
> form the minimum bounding rectangle. Is there a stored procedure for
> this? Or at least one I could loop over?
>
> Thanks!
>
> --
> web http://www.hyxspace.com
> aim hyx1138
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list