[mapserver-commits] r8392 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Jan 6 14:14:38 EST 2009
Author: warmerdam
Date: 2009-01-06 14:14:38 -0500 (Tue, 06 Jan 2009)
New Revision: 8392
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwmslayer.c
Log:
Correct half pixel error in BBOX request to remote WMS (#2843)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-01-06 18:27:50 UTC (rev 8391)
+++ trunk/mapserver/HISTORY.TXT 2009-01-06 19:14:38 UTC (rev 8392)
@@ -12,6 +12,8 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- Correct half pixel error in WMS layer's BBOX request to remote WMS (#2843)
+
- Expose Map/Layer's Projection objects in PHP/MapScript (#2845)
- Added getUnits() methods to projectionObj in Mapscript (#2798)
Modified: trunk/mapserver/mapwmslayer.c
===================================================================
--- trunk/mapserver/mapwmslayer.c 2009-01-06 18:27:50 UTC (rev 8391)
+++ trunk/mapserver/mapwmslayer.c 2009-01-06 19:14:38 UTC (rev 8392)
@@ -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