[mapserver-commits] r9968 - branches/branch-5-4/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Mar 22 09:27:10 EDT 2010
Author: dmorissette
Date: 2010-03-22 09:27:09 -0400 (Mon, 22 Mar 2010)
New Revision: 9968
Modified:
branches/branch-5-4/mapserver/mappostgis.c
Log:
Fix PostGIS SQL bbox problem introduced by r9802 (#3324)
Modified: branches/branch-5-4/mapserver/mappostgis.c
===================================================================
--- branches/branch-5-4/mapserver/mappostgis.c 2010-03-22 13:18:57 UTC (rev 9967)
+++ branches/branch-5-4/mapserver/mappostgis.c 2010-03-22 13:27:09 UTC (rev 9968)
@@ -920,9 +920,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,
@@ -936,9 +936,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