[mapserver-commits] r10936 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Feb 4 16:24:35 EST 2011


Author: sdlime
Date: 2011-02-04 13:24:35 -0800 (Fri, 04 Feb 2011)
New Revision: 10936

Modified:
   trunk/mapserver/mapogcsos.c
   trunk/mapserver/mapwfslayer.c
Log:
More RFC 65 clean up *argh* (see #3647).

Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c	2011-02-04 19:43:58 UTC (rev 10935)
+++ trunk/mapserver/mapogcsos.c	2011-02-04 21:24:35 UTC (rev 10936)
@@ -684,9 +684,7 @@
     {
         msInitShape(&sShape);
     
-        status = msLayerResultsGetShape(lp, &sShape, 
-                                 lp->resultcache->results[iFeatureId].tileindex, 
-                                 lp->resultcache->results[iFeatureId].shapeindex);
+        status = msLayerGetShape(lp, &sShape, &(lp->resultcache->results[iFeatureId]));
         if(status != MS_SUCCESS) {
           xmlFreeNs(psNsOm);
           return;
@@ -931,9 +929,7 @@
     const char *pszSep=NULL;
 
     msInitShape(&sShape);
-    status = msLayerResultsGetShape(lp, &sShape, 
-                             lp->resultcache->results[iFeatureId].tileindex, 
-                             lp->resultcache->results[iFeatureId].shapeindex);
+    status = msLayerGetShape(lp, &sShape, &(lp->resultcache->results[iFeatureId]));
     if(status != MS_SUCCESS) 
       return NULL;
 
@@ -1594,9 +1590,7 @@
                                  for(k=0; k<lpTmp->resultcache->numresults; k++)
                                  {      
                                      msInitShape(&sShape);
-                                     status = msLayerResultsGetShape(lp, &sShape, 
-                                                              lpTmp->resultcache->results[k].tileindex, 
-                                                              lpTmp->resultcache->results[k].shapeindex);
+                                     status = msLayerGetShape(lp, &sShape, &(lpTmp->resultcache->results[k]));
                                      if(status != MS_SUCCESS) 
                                        continue;
 
@@ -2010,7 +2004,7 @@
 
                 for(k=0; k<lp->resultcache->numresults; k++) {      
                   msInitShape(&sShape);
-                  status = msLayerResultsGetShape(lp, &sShape, lp->resultcache->results[k].tileindex, lp->resultcache->results[k].shapeindex);
+                  status = msLayerGetShape(lp, &sShape, &(lp->resultcache->results[k]));
                   if(status != MS_SUCCESS) 
                     continue;
  
@@ -2717,7 +2711,7 @@
         if (lp->resultcache && lp->resultcache->numresults > 0) {
           for(j=0; j<lp->resultcache->numresults; j++) {      
             msInitShape(&sShape);     
-            status = msLayerResultsGetShape(lp, &sShape, lp->resultcache->results[j].tileindex, lp->resultcache->results[j].shapeindex);
+            status = msLayerGetShape(lp, &sShape, &(lp->resultcache->results[j]));
             if(status != MS_SUCCESS) 
               continue;
 

Modified: trunk/mapserver/mapwfslayer.c
===================================================================
--- trunk/mapserver/mapwfslayer.c	2011-02-04 19:43:58 UTC (rev 10935)
+++ trunk/mapserver/mapwfslayer.c	2011-02-04 21:24:35 UTC (rev 10936)
@@ -905,8 +905,8 @@
     	psInfo = (msWFSLayerInfo*)layer->wfslayerinfo;
     else
     {
-	msSetError(MS_WFSERR, "Layer is not opened.", "msWFSLayerGetShape()");
-	return MS_FAILURE;
+      msSetError(MS_WFSERR, "Layer is not opened.", "msWFSLayerGetShape()");
+      return MS_FAILURE;
     }
 
     if(psInfo->bLayerHasValidGML)
@@ -929,49 +929,7 @@
 
 }
 
-
-
 /**********************************************************************
- *                          msWFSLayerGetShape()
- *
- **********************************************************************/
-int msWFSLayerResultGetShape(layerObj *layer, shapeObj *shape, int tile, 
-                             long record)
-{
-#ifdef USE_WFS_LYR
-    msWFSLayerInfo* psInfo = NULL;
-
-    if(layer != NULL && layer->wfslayerinfo != NULL)
-    	psInfo = (msWFSLayerInfo*)layer->wfslayerinfo;
-    else
-    {
-	msSetError(MS_WFSERR, "Layer is not opened.", "msWFSLayerResultGetShape()");
-	return MS_FAILURE;
-    }
-
-    if(psInfo->bLayerHasValidGML)
-      return msOGRLayerResultGetShape(layer, shape, tile, record);
-    else
-    {
-          /* Layer is successful, but there is no data to process */
-        msFreeShape(shape);
-        shape->type = MS_SHAPE_NULL;
-        return MS_FAILURE;
-    }
-#else
-/* ------------------------------------------------------------------
- * WFS CONNECTION Support not included...
- * ------------------------------------------------------------------ */
-  msSetError(MS_WFSCONNERR, "WFS CLIENT CONNECTION support is not available.", 
-             "msWFSLayerResultGetShape()");
-  return(MS_FAILURE);
-#endif /* USE_WFS_LYR */
-
-}
-
-
-
-/**********************************************************************
  *                          msWFSLayerGetNextShape()
  *
  **********************************************************************/



More information about the mapserver-commits mailing list