[postgis-users] overall bbox from some polygons

Stephen Crawford src176 at psu.edu
Wed Apr 25 07:56:05 PDT 2007


Try 'extent()', which is an aggregate function like sum() or count():

Select extent(the_geom) from polytable where oid in (....) 

-Steve

Stephen Crawford
Center for Environmental Informatics
GeoVISTA Center
The Pennsylvania State University
814.865.9905
src176 at psu.edu



-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Samson,
Marko
Sent: Wednesday, April 25, 2007 10:34 AM
To: PostGIS Users Discussion
Subject: [postgis-users] overall bbox from some polygons

Hi,

I want to get an overall-bbox of some polygons with a select statement.
With "select envelope(the_geom)from polygontable where oid in (.....)" I
just get the separate geoms of every single polygon. Now I'm looking for a
solution to get the bbox of all these polygons.
Is there a function or other elegant way to get the 'overall envelope'
of some polygons, or do I have to create a little sorting function into my
phpscript

Bye,
Marko
_______________________________________________
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