[mapserver-commits] r9967 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Mon Mar 22 09:18:57 EDT 2010


Author: dmorissette
Date: 2010-03-22 09:18:57 -0400 (Mon, 22 Mar 2010)
New Revision: 9967

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mappostgis.c
Log:
Fixed problem with PostGIS SQL bbox introduced in 5.6.2 (#3324)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2010-03-20 17:54:25 UTC (rev 9966)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2010-03-22 13:18:57 UTC (rev 9967)
@@ -15,7 +15,7 @@
 Current Version (SVN branch-5-6):
 --------------------------------
 
-- ...
+- Fixed problem with PostGIS SQL bbox introduced in 5.6.2 (#3324)
 
 
 Version 5.6.2 (2010-03-20):

Modified: branches/branch-5-6/mapserver/mappostgis.c
===================================================================
--- branches/branch-5-6/mapserver/mappostgis.c	2010-03-20 17:54:25 UTC (rev 9966)
+++ branches/branch-5-6/mapserver/mappostgis.c	2010-03-22 13:18:57 UTC (rev 9967)
@@ -919,9 +919,9 @@
     }
 
     if ( strSRID ) {
-        static char *strBoxTemplate = "GeomFromText('POLYGON((%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f))',%s)";
+        static char *strBoxTemplate = "GeomFromText('POLYGON((%.15g %.15g,%.15g %.15g,%.15g %.15g,%.15g %.15g,%.15g %.15g))',%s)";
         /* 10 doubles + 1 integer + template characters */
-        sz = 10 * 15 + strlen(strSRID) + strlen(strBoxTemplate);
+        sz = 10 * 22 + strlen(strSRID) + strlen(strBoxTemplate);
         strBox = (char*)malloc(sz+1); /* add space for terminating NULL */
         if ( sz <= snprintf(strBox, sz, strBoxTemplate,
                 rect->minx, rect->miny,
@@ -935,9 +935,9 @@
         	return 0;
 	}
     } else {
-        static char *strBoxTemplate = "GeomFromText('POLYGON((%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f))')";
+        static char *strBoxTemplate = "GeomFromText('POLYGON((%.15g %.15g,%.15g %.15g,%.15g %.15g,%.15g %.15g,%.15g %.15g))')";
         /* 10 doubles + template characters */
-        sz = 10 * 15 + strlen(strBoxTemplate);
+        sz = 10 * 22 + strlen(strBoxTemplate);
         strBox = (char*)malloc(sz+1); /* add space for terminating NULL */
         if ( sz <= snprintf(strBox, sz, strBoxTemplate,
                 rect->minx, rect->miny,



More information about the mapserver-commits mailing list