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

Martin Chapman mchapman at texelinc.com
Fri Apr 18 16:44:26 EDT 2008


Puneet,

I think there is a sql trace option in SQLite that allows you to see all sql
statements executed to database.  I'm not sure how you might enable that in
MapServer but maybe that would show you what is going on.  See the sqlite
api docs for the trace statement.

Best regards,
Martin

-----Original Message-----
From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of P Kishor
Sent: Friday, April 18, 2008 2:30 PM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] Investigating OpenLayers -> MapServer (WMS) -> OGR -> db

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/
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list