[mapserver-commits] r11880 - in trunk/mapserver: . mapscript/php mapscript/swiginc

svn at osgeo.org svn at osgeo.org
Thu Jul 7 15:51:37 EDT 2011


Author: sdlime
Date: 2011-07-07 12:51:37 -0700 (Thu, 07 Jul 2011)
New Revision: 11880

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapchart.c
   trunk/mapserver/mapcluster.c
   trunk/mapserver/mapdraw.c
   trunk/mapserver/mapgraticule.c
   trunk/mapserver/maplayer.c
   trunk/mapserver/mapmssql2008.c
   trunk/mapserver/mapogr.cpp
   trunk/mapserver/maporaclespatial.c
   trunk/mapserver/mapows.h
   trunk/mapserver/mappostgis.c
   trunk/mapserver/mapquery.c
   trunk/mapserver/mapraster.c
   trunk/mapserver/maprasterquery.c
   trunk/mapserver/mapscript/php/mapscript_i.c
   trunk/mapserver/mapscript/swiginc/layer.i
   trunk/mapserver/mapsde.c
   trunk/mapserver/mapserver.h
   trunk/mapserver/mapshape.c
   trunk/mapserver/mapunion.c
   trunk/mapserver/mapwfslayer.c
Log:
Fix performance issue with Oracle and scrollable cursors (#3905).

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/HISTORY.TXT	2011-07-07 19:51:37 UTC (rev 11880)
@@ -14,6 +14,8 @@
 
 Current Version (SVN trunk, 6.1-dev, future 6.2): 
 -------------------------------------------------
+- Fix performance issue with Oracle and scrollable cursors (#3905)
+
 - Fix attribute binding for layer styles (#3941)
 
 - Added missing fclose() when writing query files (#3943)

Modified: trunk/mapserver/mapchart.c
===================================================================
--- trunk/mapserver/mapchart.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapchart.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -614,7 +614,7 @@
             msProjectRect(&map->projection, &layer->projection, &searchrect); /* project the searchrect to source coords */
     #endif
         
-        status = msLayerWhichShapes(layer, searchrect);
+        status = msLayerWhichShapes(layer, searchrect, MS_FALSE);
         if(status == MS_DONE) { /* no overlap */
             msLayerClose(layer);
             return MS_SUCCESS;

Modified: trunk/mapserver/mapcluster.c
===================================================================
--- trunk/mapserver/mapcluster.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapcluster.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -936,7 +936,7 @@
 #endif
 
 /* rebuild the clusters according to the current extent */
-int RebuildClusters(layerObj *layer)
+int RebuildClusters(layerObj *layer, int isQuery)
 {
     mapObj* map;
 	layerObj* srcLayer;
@@ -1045,7 +1045,7 @@
     srcLayer = &layerinfo->srcLayer;
 
     /* start retrieving the shapes */
-    status = msLayerWhichShapes(srcLayer, searchrect);
+    status = msLayerWhichShapes(srcLayer, searchrect, isQuery);
 	if(status == MS_DONE) 
 	{ /* no overlap */
         return MS_SUCCESS;
@@ -1365,10 +1365,10 @@
 }
 
 /* Execute a query for this layer */
-int msClusterLayerWhichShapes(layerObj *layer, rectObj rect)
+int msClusterLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
     /* rebuild the cluster database */
-    return RebuildClusters(layer);
+  return RebuildClusters(layer, isQuery);
 }
 
 static int prepareShape(layerObj* layer, msClusterLayerInfo* layerinfo, clusterInfo* current, shapeObj* shape)

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapdraw.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -834,7 +834,7 @@
     msProjectRect(&map->projection, &layer->projection, &searchrect); /* project the searchrect to source coords */
 #endif
     
-  status = msLayerWhichShapes(layer, searchrect);
+  status = msLayerWhichShapes(layer, searchrect, MS_FALSE);
   if(status == MS_DONE) { /* no overlap */
     msLayerClose(layer);
     return MS_SUCCESS;

Modified: trunk/mapserver/mapgraticule.c
===================================================================
--- trunk/mapserver/mapgraticule.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapgraticule.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -152,7 +152,7 @@
 /**********************************************************************************************************************
  *
  */
-int msGraticuleLayerWhichShapes(layerObj *layer, rectObj rect)
+int msGraticuleLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
   graticuleObj *pInfo = (graticuleObj *) layer->layerinfo;
   int iAxisTickCount = 0;
@@ -664,7 +664,7 @@
  
     msLayerOpen(layer);
    
-    status = msLayerWhichShapes(layer, searchrect);
+    status = msLayerWhichShapes(layer, searchrect, MS_FALSE);
     if(status == MS_DONE) { /* no overlap */
       msLayerClose(layer);
       return NULL;

Modified: trunk/mapserver/maplayer.c
===================================================================
--- trunk/mapserver/maplayer.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/maplayer.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -130,14 +130,14 @@
 ** Note that for shapefiles we apply any maxfeatures constraint at this point. That may be the only
 ** connection type where this is feasible.
 */
-int msLayerWhichShapes(layerObj *layer, rectObj rect)
+int msLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
   if ( ! layer->vtable) {
       int rv =  msInitializeVirtualTable(layer);
       if (rv != MS_SUCCESS)
           return rv;
   }
-  return layer->vtable->LayerWhichShapes(layer, rect);
+  return layer->vtable->LayerWhichShapes(layer, rect, isQuery);
 }
 
 /*
@@ -1137,7 +1137,7 @@
   return MS_FALSE;
 }
 
-int LayerDefaultWhichShapes(layerObj *layer, rectObj rect)
+int LayerDefaultWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
   return MS_SUCCESS;
 }

Modified: trunk/mapserver/mapmssql2008.c
===================================================================
--- trunk/mapserver/mapmssql2008.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapmssql2008.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -679,7 +679,7 @@
 }
 
 /* Execute SQL query for this layer */
-int msMSSQL2008LayerWhichShapes(layerObj *layer, rectObj rect)
+int msMSSQL2008LayerWhichShapes(layerObj *layer, rectObj rect, in isQuery)
 {
     msMSSQL2008LayerInfo  *layerinfo = 0;
     char    *query_str = 0;
@@ -1901,7 +1901,7 @@
     return MS_FAILURE;
 }
 
-int msMSSQL2008LayerWhichShapes(layerObj *layer, rectObj rect)
+int msMSSQL2008LayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
     msSetError(MS_QUERYERR, "msMSSQL2008LayerWhichShapes called but unimplemented!(mapserver not compiled with MSSQL2008 support)", "msMSSQL2008LayerWhichShapes()");
     return MS_FAILURE;

Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapogr.cpp	2011-07-07 19:51:37 UTC (rev 11880)
@@ -2392,7 +2392,7 @@
  * Returns MS_SUCCESS/MS_FAILURE, or MS_DONE if no shape matching the
  * layer's FILTER overlaps the selected region.
  **********************************************************************/
-int msOGRLayerWhichShapes(layerObj *layer, rectObj rect) 
+int msOGRLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery) 
 {
 #ifdef USE_OGR
   msOGRFileInfo *psInfo =(msOGRFileInfo*)layer->layerinfo;

Modified: trunk/mapserver/maporaclespatial.c
===================================================================
--- trunk/mapserver/maporaclespatial.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/maporaclespatial.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -1922,7 +1922,7 @@
 
 /* create SQL statement for retrieving shapes */
 /* Sets up cursor for use in *NextShape and *GetShape */
-int msOracleSpatialLayerWhichShapes( layerObj *layer, rectObj rect )
+int msOracleSpatialLayerWhichShapes( layerObj *layer, rectObj rect, int isQuery)
 {
     int success, i;
     int function = 0;
@@ -2199,6 +2199,9 @@
     
     if (success)
     {
+        int cursor_type = OCI_DEFAULT;
+        if(isQuery) cursor_type =OCI_STMT_SCROLLABLE_READONLY;
+
         success = TRY( hand,
             /* define spatial position adtp ADT object */
             OCIDefineByPos( sthand->stmthp, &adtp, hand->errhp, (ub4)numitemsinselect+1, (dvoid *)0, (sb4)0, SQLT_NTY, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)OCI_DEFAULT) )
@@ -2207,7 +2210,7 @@
             OCIDefineObject( adtp, hand->errhp, dthand->tdo, (dvoid **)sthand->obj, (ub4 *)0, (dvoid **)sthand->ind, (ub4 *)0 ) )
                && TRY(hand,
             /* execute */
-            OCIStmtExecute( hand->svchp, sthand->stmthp, hand->errhp, (ub4)ARRAY_SIZE, (ub4)0, (OCISnapshot *)NULL, (OCISnapshot *)NULL, (ub4)OCI_STMT_SCROLLABLE_READONLY ) )
+            OCIStmtExecute( hand->svchp, sthand->stmthp, hand->errhp, (ub4)ARRAY_SIZE, (ub4)0, (OCISnapshot *)NULL, (OCISnapshot *)NULL, (ub4)cursor_type ) )
                &&  TRY( hand,
             /* get rows fetched */
             OCIAttrGet( (dvoid *)sthand->stmthp, (ub4)OCI_HTYPE_STMT, (dvoid *)&sthand->rows_fetched, (ub4 *)0, (ub4)OCI_ATTR_ROWS_FETCHED, hand->errhp ) )
@@ -3518,7 +3521,7 @@
   return MS_FAILURE;
 }
 
-int msOracleSpatialLayerWhichShapes(layerObj *layer, rectObj rect)
+int msOracleSpatialLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
   msSetError( MS_ORACLESPATIALERR, "OracleSpatial is not supported", "msOracleSpatialLayerWhichShapes()" );
   return MS_FAILURE;

Modified: trunk/mapserver/mapows.h
===================================================================
--- trunk/mapserver/mapows.h	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapows.h	2011-07-07 19:51:37 UTC (rev 11880)
@@ -435,7 +435,7 @@
 int msWFSLayerIsOpen(layerObj *lp); 
 int msWFSLayerInitItemInfo(layerObj *layer);
 int msWFSLayerGetItems(layerObj *layer);
-int msWFSLayerWhichShapes(layerObj *layer, rectObj rect);
+int msWFSLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery);
 int msWFSLayerClose(layerObj *lp);
 MS_DLL_EXPORT char *msWFSExecuteGetFeature(layerObj *lp);
 

Modified: trunk/mapserver/mappostgis.c
===================================================================
--- trunk/mapserver/mappostgis.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mappostgis.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -2395,7 +2395,7 @@
 **
 ** Registered vtable->LayerWhichShapes function.
 */
-int msPostGISLayerWhichShapes(layerObj *layer, rectObj rect) {
+int msPostGISLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery) {
 #ifdef USE_POSTGIS
     msPostGISLayerInfo *layerinfo = NULL;
     char *strSQL = NULL;

Modified: trunk/mapserver/mapquery.c
===================================================================
--- trunk/mapserver/mapquery.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapquery.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -674,7 +674,7 @@
     lp->project = MS_FALSE;
 #endif
 
-  status = msLayerWhichShapes(lp, searchrect);
+  status = msLayerWhichShapes(lp, searchrect, MS_TRUE);
   if(status == MS_DONE) { /* no overlap */
     msRestoreOldFilter(lp, old_filtertype, old_filteritem, old_filterstring); /* manually reset the filter */
     msLayerClose(lp);
@@ -853,7 +853,7 @@
       lp->project = MS_FALSE;
 #endif
 
-    status = msLayerWhichShapes(lp, search_rect);
+    status = msLayerWhichShapes(lp, search_rect, MS_TRUE);
     if(status == MS_DONE) { /* no overlap */
       msLayerClose(lp);
       continue;
@@ -1035,7 +1035,7 @@
     else
       lp->project = MS_FALSE;
 #endif
-    status = msLayerWhichShapes(lp, searchrect);
+    status = msLayerWhichShapes(lp, searchrect, MS_TRUE);
     if(status == MS_DONE) { /* no overlap */
       msLayerClose(lp);
       continue;
@@ -1276,7 +1276,7 @@
 	lp->project = MS_FALSE;
 #endif
 
-      status = msLayerWhichShapes(lp, searchrect);
+      status = msLayerWhichShapes(lp, searchrect, MS_TRUE);
       if(status == MS_DONE) { /* no overlap */
 	msLayerClose(lp);
 	break; /* next layer */
@@ -1548,7 +1548,7 @@
     else
       lp->project = MS_FALSE;
 #endif
-    status = msLayerWhichShapes(lp, searchrect);
+    status = msLayerWhichShapes(lp, searchrect, MS_TRUE);
     if(status == MS_DONE) { /* no overlap */
       msLayerClose(lp);
       continue;
@@ -1749,7 +1749,7 @@
       lp->project = MS_FALSE;
 #endif
 
-    status = msLayerWhichShapes(lp, searchrect);
+    status = msLayerWhichShapes(lp, searchrect, MS_TRUE);
     if(status == MS_DONE) { /* no overlap */
       msLayerClose(lp);
       continue;

Modified: trunk/mapserver/mapraster.c
===================================================================
--- trunk/mapserver/mapraster.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapraster.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -486,7 +486,7 @@
     /* if necessary, project the searchrect to source coords */
     if((map->projection.numargs > 0) && (layer->projection.numargs > 0)) msProjectRect(&map->projection, &layer->projection, &searchrect);
 #endif
-    status = msLayerWhichShapes(tlp, searchrect);
+    status = msLayerWhichShapes(tlp, searchrect, MS_FALSE);
     if (status != MS_SUCCESS) {
         /* Can be either MS_DONE or MS_FAILURE */
         if (status != MS_DONE) 

Modified: trunk/mapserver/maprasterquery.c
===================================================================
--- trunk/mapserver/maprasterquery.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/maprasterquery.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -831,7 +831,7 @@
         /* if necessary, project the searchrect to source coords */
         if((map->projection.numargs > 0) && (layer->projection.numargs > 0)) msProjectRect(&map->projection, &layer->projection, &searchrect);
 #endif
-        status = msLayerWhichShapes(tlp, searchrect);
+        status = msLayerWhichShapes(tlp, searchrect, MS_TRUE);
         if (status != MS_SUCCESS) {
             goto cleanup;
         }
@@ -1242,7 +1242,7 @@
 /************************************************************************/
 /*                      msRASTERLayerWhichShapes()                      */
 /************************************************************************/
-int msRASTERLayerWhichShapes(layerObj *layer, rectObj rect) 
+int msRASTERLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery) 
 
 {
 #ifndef USE_GDAL

Modified: trunk/mapserver/mapscript/php/mapscript_i.c
===================================================================
--- trunk/mapserver/mapscript/php/mapscript_i.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapscript/php/mapscript_i.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -457,7 +457,7 @@
     }
     self->connectiontype = oldconnectiontype;
 
-    return msLayerWhichShapes(self, *poRect);
+    return msLayerWhichShapes(self, *poRect, MS_FALSE);
 }
 
 

Modified: trunk/mapserver/mapscript/swiginc/layer.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/layer.i	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapscript/swiginc/layer.i	2011-07-07 19:51:37 UTC (rev 11880)
@@ -165,7 +165,7 @@
         }
         self->connectiontype = oldconnectiontype;
 
-        return msLayerWhichShapes(self, rect);
+        return msLayerWhichShapes(self, rect, MS_FALSE);
     }	
 
     %newobject nextShape;

Modified: trunk/mapserver/mapsde.c
===================================================================
--- trunk/mapserver/mapsde.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapsde.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -1474,7 +1474,7 @@
 /*     starts a stream query using spatial filter.  Also limits the     */
 /*     query by the layer's FILTER item as well.                        */
 /* -------------------------------------------------------------------- */
-int msSDELayerWhichShapes(layerObj *layer, rectObj rect) {
+int msSDELayerWhichShapes(layerObj *layer, rectObj rect, int isQuery) {
 #ifdef USE_SDE
     long status;
     SE_ENVELOPE envelope;

Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapserver.h	2011-07-07 19:51:37 UTC (rev 11880)
@@ -1648,7 +1648,7 @@
   void (*LayerFreeItemInfo)(layerObj *layer);
   int (*LayerOpen)(layerObj *layer);
   int (*LayerIsOpen)(layerObj *layer);
-  int (*LayerWhichShapes)(layerObj *layer, rectObj rect);
+  int (*LayerWhichShapes)(layerObj *layer, rectObj rect, int isQuery);
   int (*LayerNextShape)(layerObj *layer, shapeObj *shape);
   int (*LayerGetShape)(layerObj *layer, shapeObj *shape, resultObj *record);
   int (*LayerClose)(layerObj *layer);
@@ -2062,7 +2062,7 @@
 MS_DLL_EXPORT int msClusterLayerOpen(layerObj *layer); /* in mapcluster.c */
 MS_DLL_EXPORT int msLayerIsOpen(layerObj *layer);
 MS_DLL_EXPORT void msLayerClose(layerObj *layer);
-MS_DLL_EXPORT int msLayerWhichShapes(layerObj *layer, rectObj rect);
+MS_DLL_EXPORT int msLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery);
 MS_DLL_EXPORT int msLayerGetItemIndex(layerObj *layer, char *item);
 MS_DLL_EXPORT int msLayerWhichItems(layerObj *layer, int get_all, char *metadata); 
 MS_DLL_EXPORT int msLayerNextShape(layerObj *layer, shapeObj *shape);
@@ -2378,7 +2378,7 @@
 /* ==================================================================== */
 /*      Public prototype for mapogr.cpp functions.                      */
 /* ==================================================================== */
-int MS_DLL_EXPORT msOGRLayerWhichShapes(layerObj *layer, rectObj rect);
+int MS_DLL_EXPORT msOGRLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery);
 int MS_DLL_EXPORT msOGRLayerOpen(layerObj *layer, const char *pszOverrideConnection); /* in mapogr.cpp */
 int MS_DLL_EXPORT msOGRLayerClose(layerObj *layer);
 

Modified: trunk/mapserver/mapshape.c
===================================================================
--- trunk/mapserver/mapshape.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapshape.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -1962,7 +1962,7 @@
 }
 
 
-int msTiledSHPWhichShapes(layerObj *layer, rectObj rect)
+int msTiledSHPWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
   int i, status;
   char *filename, tilename[MS_MAXPATHLEN];
@@ -1986,7 +1986,7 @@
     shapeObj tshape;
 
     tlp = (GET_LAYER(layer->map, tSHP->tilelayerindex));
-    status= msLayerWhichShapes(tlp, rect);
+    status= msLayerWhichShapes(tlp, rect, isQuery);
     if(status != MS_SUCCESS) return(status); /* could be MS_DONE or MS_FAILURE */
 
     msTileIndexAbsoluteDir(tiFileAbsDir, layer);
@@ -2535,7 +2535,7 @@
     return MS_FALSE;
 }
 
-int msSHPLayerWhichShapes(layerObj *layer, rectObj rect)
+int msSHPLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
   int i, n1=0, n2=0;
   int status;

Modified: trunk/mapserver/mapunion.c
===================================================================
--- trunk/mapserver/mapunion.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapunion.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -411,7 +411,7 @@
     return MS_SUCCESS;
 }
 
-int msUnionLayerWhichShapes(layerObj *layer, rectObj rect)
+int msUnionLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
 {
     int i;
     layerObj* srclayer;
@@ -443,7 +443,7 @@
         if(srclayer->transform == MS_TRUE && srclayer->project && layer->transform == MS_TRUE && layer->project &&msProjectionsDiffer(&(srclayer->projection), &(layer->projection)))
             msProjectRect(&layer->projection, &srclayer->projection, &srcRect); /* project the searchrect to source coords */
 #endif        
-        layerinfo->status[i] = msLayerWhichShapes(srclayer, srcRect);
+        layerinfo->status[i] = msLayerWhichShapes(srclayer, srcRect, isQuery);
         if (layerinfo->status[i] == MS_FAILURE)
             return MS_FAILURE;
     }

Modified: trunk/mapserver/mapwfslayer.c
===================================================================
--- trunk/mapserver/mapwfslayer.c	2011-07-07 09:44:09 UTC (rev 11879)
+++ trunk/mapserver/mapwfslayer.c	2011-07-07 19:51:37 UTC (rev 11880)
@@ -772,7 +772,7 @@
         {
             if (lp->layerinfo == NULL)
             {
-                if (msWFSLayerWhichShapes(lp, psInfo->rect) == MS_FAILURE)
+	      if (msWFSLayerWhichShapes(lp, psInfo->rect, MS_FALSE) == MS_FAILURE) /* no access to context (draw vs. query) here, although I doubt it matters... */
                   return MS_FAILURE;
             }
             return MS_SUCCESS;  /* Nothing to do... layer is already opened */
@@ -826,7 +826,7 @@
         msProjectRect(&lp->map->projection, &lp->projection, &psInfo->rect); /* project the searchrect to source coords */
 #endif
 
-    if (msWFSLayerWhichShapes(lp, psInfo->rect) == MS_FAILURE)
+    if (msWFSLayerWhichShapes(lp, psInfo->rect, MS_FALSE) == MS_FAILURE)  /* no access to context (draw vs. query) here, although I doubt it matters... */
         status = MS_FAILURE;
     
 
@@ -1050,7 +1050,7 @@
  *
  **********************************************************************/
 
-int msWFSLayerWhichShapes(layerObj *lp, rectObj rect)
+int msWFSLayerWhichShapes(layerObj *lp, rectObj rect, int isQuery)
 {
 #ifdef USE_WFS_LYR
     msWFSLayerInfo *psInfo;
@@ -1210,7 +1210,7 @@
     if ((status = msOGRLayerOpen(lp, psInfo->pszGMLFilename)) != MS_SUCCESS)
         return status;
     
-    status = msOGRLayerWhichShapes(lp, rect);
+    status = msOGRLayerWhichShapes(lp, rect, isQuery);
    
     /* Mark that the OGR Layer is valid */
     psInfo->bLayerHasValidGML = MS_TRUE;



More information about the mapserver-commits mailing list