[mapserver-commits] r13027 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Feb 2 08:56:22 EST 2012


Author: aboudreault
Date: 2012-02-02 05:56:22 -0800 (Thu, 02 Feb 2012)
New Revision: 13027

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapdrawgdal.c
Log:
Raster layer fails to be drawn if the window is less than half a pixel (#4172)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2012-02-02 12:21:02 UTC (rev 13026)
+++ trunk/mapserver/HISTORY.TXT	2012-02-02 13:56:22 UTC (rev 13027)
@@ -15,6 +15,8 @@
 Current Version (SVN trunk, 6.1-dev, future 6.2): 
 -------------------------------------------------
 
+- Raster layer fails to be drawn if the window is less than half a pixel (#4172)
+
 - shptree: Improvement to reduce size of .qix files (#4169)
 
 - avoid potential gd fontcache deadlock on fastcgi exit signals(#4093)

Modified: trunk/mapserver/mapdrawgdal.c
===================================================================
--- trunk/mapserver/mapdrawgdal.c	2012-02-02 12:21:02 UTC (rev 13026)
+++ trunk/mapserver/mapdrawgdal.c	2012-02-02 13:56:22 UTC (rev 13027)
@@ -250,6 +250,12 @@
         src_ysize = MIN(MAX(0,(int) (lly - ury + 0.5)),
                         GDALGetRasterYSize(hDS) - src_yoff);
 
+	/* We want very small windows to use at least one source pixel (#4172) */
+	if( src_xsize == 0 && (urx - llx) > 0.0 )
+	    src_xsize = 1;
+	if( src_ysize == 0 && (lly - ury) > 0.0 )
+	    src_ysize = 1;
+
         if( src_xsize == 0 || src_ysize == 0 )
         {
             if( layer->debug )



More information about the mapserver-commits mailing list