[gdal-dev] Investigating OpenLayers -> MapServer (WMS) -> OGR -> db

P Kishor punk.kish at gmail.com
Fri Apr 18 16:30:26 EDT 2008

I am experimenting with OpenLayers calling MapServer (WMS) using OGR
to extract data from a database. I am now able to log the following --

[Fri Apr 18 08:46:54 2008].505608
[Fri Apr 18 08:46:54 2008].505626
[Fri Apr 18 08:46:54 2008].505647
[Fri Apr 18 08:46:54 2008].505654
[Fri Apr 18 08:46:54 2008].506741 msDrawMap(): Layer 0 (sg_zip), 0.257s
[Fri Apr 18 08:46:54 2008].216458
[Fri Apr 18 08:46:54 2008].228475 OGROPen(/Users/punkish/Data/sqlitegis/wi.db)
[Fri Apr 18 08:46:54 2008].231712

but I want the exact SQL statement being executed. See, in my mapfile, I ask for

DATA "SELECT wkt_geometry FROM <table>"

But, OpenLayers sends a BBOX, so each SELECT should actually be something like

SELECT wkt_geometry FROM <table> WHERE <extent of features is in the BBOX>

That is what I want to investigate. What exactly is OGR/MapServer
executing? What is the form of "WHERE <extent of features in the
BBOX>"? How can I log this level of detail?

Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/

More information about the gdal-dev mailing list