[Mapserver-users] WMS BBOX vs. Actual Bounds

Ian Turton ian at geography.leeds.ac.uk
Thu Jan 8 05:35:39 EST 2004


At 14:42 07/01/2004 -0600, Steve Lime wrote:
>There's no way with pure WMS (that I know of) to get the computed bounds
>back other than by precomputing them to perfectly fit your requested
>image size. I've done that with a java digitizing client that took WMS
>images from MapServer and overlayed information from a seperate SDE/Java
>application. Worked fine. I've attached the simple map geometry class I
>used in that case, look at the fit method.
>
>Regarding bounds computation. MapServer gaurantees that the requested
>extent will fit in the image, so one of the dimensions will remain fixed
>while the other is expanded as necessary. The decision as to which to
>expand is based on how the extent is oriented (think portrait vs
>landscape) relative to the "shape" of the image. The idea is to minimize
>stuff outside the extent.

This is poor behaviour on the part of mapserver - it should return a map 
with the bounds requested and the size of image requested, at least when 
working in WMS mode.
This saves some heart ache for the client, though in general you want to 
request a set of bounds with the same aspect ratio as your image size. 
However, if you actually want the image distorted then mapserver breaks 
what you're trying to do.

Ian

Ian Turton, Director, Centre for Computational Geography, University of 
Leeds, Leeds, LS2 9JT
http://www.geog.leeds.ac.uk/people/i.turton http://www.ccg.leeds.ac.uk 
http://www.geotools.org
+44 (0) 113 343 3392 fax: +44 (0) 113 343 3308




More information about the mapserver-users mailing list