[mapserver-users] q. combining mapscript and PostGIS

Alex Rice alex_rice at arc.to
Mon Aug 12 17:02:28 PDT 2002


Hi, I am using Perl mapscript. I am wondering if there are any 
other ways to manipulate the extent of the map object, other than 
by directly accessing mapobject's rectobject. Like via a layer's 
filter somehow?

I am querying postgis tables for street objects and school 
district objects. I want to zoom the map object's extent to match 
the bounding box of search results. I think the postgis query for 
the bounding box would be like:

# select Extent(the_geom) from cityplus where stanno like '%LOMAS 
BLVD%';
BOX3D(-106.670434 35.086152 0,-106.487795 35.094625 0)
(1 row)

I know I could open a DBI connection, do another query, and then 
setting the extent on the mapobject's rectobj. But I don't want 
to use DBI unless necessary.

Thanks,

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alex_rice at arc.to
alrice at swcp.com





More information about the MapServer-users mailing list