[postgis-users] Getting the bounding box of a feature
Menke, Kurt
kmenke at edac.unm.edu
Wed Mar 30 13:18:37 PST 2005
Hello,
I'm developing a client in using PHP 4.3.4, Mapserver 4.4.1, and PostGIS
1.0.0 (PostgreSQL 7.4.1).
I need to programmatically access the bounding box of a selected polygon in
a PostGIS feature class so that I can use Mapscript to zoom to it. I've
tested the SQL below in PostgreSQL and it returns: BOX3D(560748.25 3881950
0,568816.25 3890818.75 0). However, when I try to dump the results into a
PHP variable I can't seem to access the results. When I try to echo the
results out to the page I get "Resource ID #68.
I'm not familiar with the BOX3D format. Is there any info on BOX3D out
there? Does this get returned as a string or an array or something else? If
there's a better way to do this I would very much appreciate that info as
well.
$extent_sql = "SELECT EXTENT(public.nmranch04.the_geom)FROM public.nmranch04
WHERE (public.nmranch04.ranch_name = ".$ranch.")";
Thanks
Kurt
~~~~~~~~~~~~~~~~~~~~~~~~~
Kurt A. Menke
GIS Analyst/Programmer
Mailing Address
Earth Data Analysis Center
MSC01 1110
1 University of New Mexico
Albuquerque, New Mexico 87131-0001
Street Address
University of New Mexico
Bandelier West, Room 123
Albuquerque, NM 87131
Phone: (505) 277-3622 (ext. 239)
FAX: (505) 277-3614
email: kmenke at edac.unm.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050330/25e65218/attachment.html>
More information about the postgis-users
mailing list