[mapserver-commits] r8872 - branches/branch-5-4/mapserver

svn at osgeo.org svn at osgeo.org
Thu Apr 2 16:45:30 EDT 2009


Author: tomkralidis
Date: 2009-04-02 16:45:30 -0400 (Thu, 02 Apr 2009)
New Revision: 8872

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/mapogcfilter.c
   branches/branch-5-4/mapserver/mapquery.c
   branches/branch-5-4/mapserver/mapserv.c
Log:
clean up GEOS init and cleanup functions (#2929) 



Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-04-02 20:05:01 UTC (rev 8871)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-04-02 20:45:30 UTC (rev 8872)
@@ -15,6 +15,8 @@
 Version 5.4.0-beta4 (2009-04-01):
 ---------------------------------
 
+- clean up GEOS init and cleanup functions (#2929) 
+
 - Made sure computation of default symbol size is consistent will older versions (#2963)
 
 - Improved security relative to untrusted directories and mapfiles (RFC 56)

Modified: branches/branch-5-4/mapserver/mapogcfilter.c
===================================================================
--- branches/branch-5-4/mapserver/mapogcfilter.c	2009-04-02 20:05:01 UTC (rev 8871)
+++ branches/branch-5-4/mapserver/mapogcfilter.c	2009-04-02 20:45:30 UTC (rev 8872)
@@ -348,9 +348,6 @@
                  strcasecmp(psNode->pszValue, "Beyond") == 0 ) &&
                 dfDistance > 0)
             {
-#ifdef USE_GEOS
-                msGEOSSetup();
-#endif
                 if (nUnit >=0 && nUnit != map->units)
                   dfDistance *= msInchesPerUnit(nUnit,0)/msInchesPerUnit(map->units,0);
 
@@ -360,9 +357,6 @@
                     status = msQueryByOperator(map, lp->index,  psTmpShape, geos_operator);
                     msFreeShape(psTmpShape);
                 }
-#ifdef USE_GEOS
-                msGEOSCleanup();
-#endif
             }
             else
               status = msQueryByOperator(map, lp->index,  psQueryShape, geos_operator);
@@ -399,9 +393,6 @@
                  strcasecmp(psNode->pszValue, "Beyond") == 0 ) &&
                 dfDistance > 0)
             {
-#ifdef USE_GEOS
-                msGEOSSetup();   
-#endif         
 /* -------------------------------------------------------------------- */
 /*      if units is set, covert value from unit to map unit.            */
 /* -------------------------------------------------------------------- */
@@ -414,9 +405,6 @@
                     status = msQueryByOperator(map, lp->index,  psTmpShape, geos_operator);
                     msFreeShape(psTmpShape);
                 }
-#ifdef USE_GEOS
-                msGEOSCleanup();
-#endif
             } 
             else
               status = msQueryByOperator(map, lp->index,  psQueryShape, geos_operator);

Modified: branches/branch-5-4/mapserver/mapquery.c
===================================================================
--- branches/branch-5-4/mapserver/mapquery.c	2009-04-02 20:05:01 UTC (rev 8871)
+++ branches/branch-5-4/mapserver/mapquery.c	2009-04-02 20:45:30 UTC (rev 8872)
@@ -1311,9 +1311,6 @@
 
     msInitShape(&shape);
 
-    /*todo call should be moved somewhere else*/
-    msGEOSSetup();
-
     /* this should not be a necessary test for uries using geos*/
     /*
       if(selectshape->type != MS_SHAPE_POLYGON) {
@@ -1515,9 +1512,6 @@
       msLayerClose(lp);
     } /* next layer */
 
-    /*todo call should be moved somewhere else*/
-    msGEOSCleanup();
-
     /* was anything found? */
     for(l=start; l>=stop; l--) {    
       if(GET_LAYER(map, l)->resultcache && GET_LAYER(map, l)->resultcache->numresults > 0)

Modified: branches/branch-5-4/mapserver/mapserv.c
===================================================================
--- branches/branch-5-4/mapserver/mapserv.c	2009-04-02 20:05:01 UTC (rev 8871)
+++ branches/branch-5-4/mapserver/mapserv.c	2009-04-02 20:45:30 UTC (rev 8872)
@@ -1135,6 +1135,8 @@
   struct mstimeval execstarttime, execendtime;
   struct mstimeval requeststarttime, requestendtime;
 
+  msSetup();
+
   /* Use MS_ERRORFILE and MS_DEBUGLEVEL env vars if set */
   if( msDebugInitFromEnv() != MS_SUCCESS ) {
     writeError();



More information about the mapserver-commits mailing list