[mapserver-commits] r13206 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Mar 6 16:15:39 EST 2012


Author: aboudreault
Date: 2012-03-06 13:15:39 -0800 (Tue, 06 Mar 2012)
New Revision: 13206

Modified:
   trunk/mapserver/mapdrawgdal.c
Log:
Fixed raster window offset when the layer is less than  half a pixel (on boundaries)

Modified: trunk/mapserver/mapdrawgdal.c
===================================================================
--- trunk/mapserver/mapdrawgdal.c	2012-03-06 21:12:23 UTC (rev 13205)
+++ trunk/mapserver/mapdrawgdal.c	2012-03-06 21:15:39 UTC (rev 13206)
@@ -252,9 +252,15 @@
 
 	/* We want very small windows to use at least one source pixel (#4172) */
 	if( src_xsize == 0 && (urx - llx) > 0.0 )
+	{
 	    src_xsize = 1;
+	    src_xoff = MIN(src_xoff,GDALGetRasterXSize(hDS)-1);
+	}
 	if( src_ysize == 0 && (lly - ury) > 0.0 )
+	{
 	    src_ysize = 1;
+	    src_yoff = MIN(src_yoff,GDALGetRasterYSize(hDS)-1);
+	}
 
         if( src_xsize == 0 || src_ysize == 0 )
         {



More information about the mapserver-commits mailing list