[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
msOGRLayerClose(/Users/punkish/Data/sqlitegis/wi.db).
[Fri Apr 18 08:46:54 2008].505626
msOGRFileClose(/Users/punkish/Data/sqlitegis/wi.db,-1).
[Fri Apr 18 08:46:54 2008].505647
msConnPoolRelease(sg_zip,/Users/punkish/Data/sqlitegis/wi.db,0x1126de0)
[Fri Apr 18 08:46:54 2008].505654
msConnPoolClose(/Users/punkish/Data/sqlitegis/wi.db,0x1126de0)
[Fri Apr 18 08:46:54 2008].506741 msDrawMap(): Layer 0 (sg_zip), 0.257s
[Fri Apr 18 08:46:54 2008].216458
msOGRFileOpen(/Users/punkish/Data/sqlitegis/wi.db)...
[Fri Apr 18 08:46:54 2008].228475 OGROPen(/Users/punkish/Data/sqlitegis/wi.db)
[Fri Apr 18 08:46:54 2008].231712
msConnPoolRegister(sg_zip,/Users/punkish/Data/sqlitegis/wi.db,0x1126de0)

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