[mapserver-commits] r8393 - branches/branch-5-2/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Jan 6 14:17:45 EST 2009
Author: warmerdam
Date: 2009-01-06 14:17:45 -0500 (Tue, 06 Jan 2009)
New Revision: 8393
Modified:
branches/branch-5-2/mapserver/HISTORY.TXT
branches/branch-5-2/mapserver/mapwmslayer.c
Log:
Correct half pixel error in BBOX request to remote WMS (#2843)
Modified: branches/branch-5-2/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-2/mapserver/HISTORY.TXT 2009-01-06 19:14:38 UTC (rev 8392)
+++ branches/branch-5-2/mapserver/HISTORY.TXT 2009-01-06 19:17:45 UTC (rev 8393)
@@ -15,6 +15,10 @@
- mapowscommon.c: output version string correctly (#2821)
+- mapwmslayer.c: Correct half pixel error in WMS layer's BBOX request to
+ remote WMS (#2843)
+
+
Version 5.2.1 (2008-12-01):
---------------------------
Modified: branches/branch-5-2/mapserver/mapwmslayer.c
===================================================================
--- branches/branch-5-2/mapserver/mapwmslayer.c 2009-01-06 19:14:38 UTC (rev 8392)
+++ branches/branch-5-2/mapserver/mapwmslayer.c 2009-01-06 19:17:45 UTC (rev 8393)
@@ -635,7 +635,17 @@
}
}
+/* ------------------------------------------------------------------
+ * Adjust for MapServer EXTENT being center of pixel and WMS BBOX being
+ * edge of pixel (#2843), and then reproject if needed.
+ * ------------------------------------------------------------------ */
bbox = map->extent;
+
+ bbox.minx -= map->cellsize * 0.5;
+ bbox.maxx += map->cellsize * 0.5;
+ bbox.miny -= map->cellsize * 0.5;
+ bbox.maxy += map->cellsize * 0.5;
+
if (msProjectionsDiffer(&(map->projection), &(lp->projection)))
{
msProjectRect(&(map->projection), &(lp->projection), &bbox);
More information about the mapserver-commits
mailing list