[postgis-users] Calculate maximum bounding extent of selected features
Paul Ramsey
pramsey at refractions.net
Tue Feb 14 12:42:33 PST 2006
On 14-Feb-06, at 11:48 AM, Jennifer Shanks wrote:
>
> Does anyone know how I can get the bounding coordinates? Would I
> use an SQL statement?
SELECT Extent(the_geom) FROM <yourtable> WHERE <your selection clause>;
That will give you a polygon to parse. Skip the parsing with:
SELECT MinX(env), MinY(env), MaxX(env), MaxY(env)
FROM
(SELECT Extent(the_geom) AS env FROM <yourtable> WHERE <your
selection clause>) AS sub;
More information about the postgis-users
mailing list