Opened 13 years ago

Last modified 13 years ago

#3933 new defect

WMS layer produces incorrect worldfile cell size distorting cascaded layers

Reported by: warmerdam Owned by: mapserverbugs
Priority: normal Milestone:
Component: WMS Client Version: unspecified
Severity: normal Keywords:
Cc: rhow, pramsey, dmorissette, assefa

Description

The following logic in mapwmslayer.c produces the wrong cell size:

            double dfCellSizeX = MS_CELLSIZE(pasReqInfo[iReq].bbox.minx,
                                             pasReqInfo[iReq].bbox.maxx, 
                                             pasReqInfo[iReq].width+1);	
            double dfCellSizeY = MS_CELLSIZE(pasReqInfo[iReq].bbox.maxy,
                                             pasReqInfo[iReq].bbox.miny, 
                                             pasReqInfo[iReq].height+1);

The problem is that MS_CELLSIZE() is designed for MapServer "center of pixel" extents but WMS bounding boxes are outer edge of pixels. The fix is to use width+1 and height+1.

I have a test case to demonstrate this but the data is potentially not redistributable. I can, if necessary, produce a redistributable demonstration.

Attachments (1)

wms.patch (892 bytes ) - added by warmerdam 13 years ago.
Proposed Fix.

Download all attachments as: .zip

Change History (2)

by warmerdam, 13 years ago

Attachment: wms.patch added

Proposed Fix.

comment:1 by warmerdam, 13 years ago

Cc: pramsey dmorissette assefa added
Note: See TracTickets for help on using tickets.