Ticket #1119 (closed defect: invalid)
WMS client makes non-square pixel request when cascading
| Reported by: | ty_wilson@… | Owned by: | mapserverbugs |
|---|---|---|---|
| Priority: | high | Milestone: | 5.0 release |
| Component: | WMS Client | Version: | 4.4 |
| Severity: | major | Keywords: | |
| Cc: |
Description (last modified by hobu) (diff)
Problem We have run into a problem cascading OGC compliant WMSes from USGS while using the following configuration of Mapserver: MapServer version 4.4.0-beta3 OUTPUT=GIF OUTPUT=PNG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE Explanation When acting as a WMS client of an OGC compliant WMS that is serving up data in a different projection, Mapserver improperly makes a non-square pixel request. While the cascaded WMS BBOX request parameter is correctly reprojected and defines a new aspect ratio, the corresponding WMS WIDTH and HEIGHT request parameters are not. The original WIDTH and HEIGHT are passed along instead. Solution On line #731 of mapwmslayer.c in the function msBuildWMSLayerURL, replace msSetWMSParamInt( psWMSParams, "WIDTH", map->width); with msSetWMSParamInt(psWMSParams, "WIDTH", (int)(map->height * (bbox.maxx- bbox.minx)/(bbox.maxy-bbox.miny))); One line #1133, replace map->width); with (int)(map->height * (pasReqInfo[iReq].bbox.maxx-pasReqInfo[iReq].bbox.minx)/ (pasReqInfo[iReq].bbox.maxy-pasReqInfo[iReq].bbox.miny))); Solution Developers Ty Wilson and Wim Ibes, with the North Central Research Station of the USDA Forest Service, debugged this problem and developed this bug fix.
Change History
Note: See
TracTickets for help on using
tickets.
