[mapserver-commits] r8713 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Mar 9 14:11:45 EDT 2009


Author: tomkralidis
Date: 2009-03-09 14:11:45 -0400 (Mon, 09 Mar 2009)
New Revision: 8713

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogcfilter.c
   trunk/mapserver/mapquery.c
   trunk/mapserver/mapserv.c
Log:
clean up GEOS init and cleanup functions (#2299)


Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-03-09 18:08:29 UTC (rev 8712)
+++ trunk/mapserver/HISTORY.TXT	2009-03-09 18:11:45 UTC (rev 8713)
@@ -22,6 +22,8 @@
 
 - WFS 1.1.0 should use OWS Common 1.0.0 (#2925)
 
+- clean up GEOS init and cleanup functions (#2299)
+
 Version 5.4.0-beta3 (2009-3-5):
 --------------------------------
 

Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c	2009-03-09 18:08:29 UTC (rev 8712)
+++ trunk/mapserver/mapogcfilter.c	2009-03-09 18:11:45 UTC (rev 8713)
@@ -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: trunk/mapserver/mapquery.c
===================================================================
--- trunk/mapserver/mapquery.c	2009-03-09 18:08:29 UTC (rev 8712)
+++ trunk/mapserver/mapquery.c	2009-03-09 18:11:45 UTC (rev 8713)
@@ -1287,9 +1287,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) {
@@ -1491,9 +1488,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: trunk/mapserver/mapserv.c
===================================================================
--- trunk/mapserver/mapserv.c	2009-03-09 18:08:29 UTC (rev 8712)
+++ trunk/mapserver/mapserv.c	2009-03-09 18:11:45 UTC (rev 8713)
@@ -1118,6 +1118,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