Opened 12 years ago
Closed 12 years ago
#4172 closed defect (fixed)
Raster layer fails to be drawn if the window is less than half a pixel
Reported by: | aboudreault | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | warmerdam |
Description
When we zoom deep in a raster layer and the window is less than half a pixel.. mapserver just returns a blank image. In a OL viewer the change is critical and pass from a valid colored images to a blank one without error.
MapServer should allow those special cases when the window is less than half a pixel but still positive.
Attachments (2)
Change History (8)
by , 12 years ago
Attachment: | raster_half_pixel_window.patch added |
---|
comment:1 by , 12 years ago
FrankW, could you confirm that my patch is ok and if if I should backport it to branch-6-0. I've run the msautotest/gdal part and nothing change on this side.
comment:2 by , 12 years ago
Alan,
Could you try a slight variation that makes sure no special values fall through the cracks and so the issue is more fully explained? Something like (untested):
src_xsize = MIN(MAX(0,(int) (urx - llx + 0.5)), GDALGetRasterXSize(hDS) - src_xoff); /* We want very small windows to use at least one source pixel (#4172) */ if( src_xsize == 0 && (urx - llx) > 0.0 ) src_xsize = 1;
comment:3 by , 12 years ago
Excellent FrankW. I'm going to commit the fix with your variation. I also going to backport this.
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It has been reported that the fix do not work when the window is off (on the raster source boundaries). I will attach a patch from Frank's hints. Frank, please confirm that the patch is ok.
by , 12 years ago
Attachment: | off_window.patch added |
---|
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
fix