[Mapserver-users] Cartographic question

Jan Hartmann j.l.h.hartmann at uva.nl
Thu Jun 24 08:15:21 PDT 2004


Ballini Yvain wrote:

> I would like to know if mapserver redefines the extent parameter after
> that it has been passed in the url.

Yvain,

I *think* MapServer does the following:

given an extent of x1,y2,x2,y2 and an image size of wi,he:

if the geographic extent has the same proportion as the image size:

(x2-x1) / (y2 - y1) = wi / he

then an image is returned with the requested extent.

If the proprortions of geographic and image extent are different, then 
MapServer scales the extent without distortion to fit completely within 
the image. In that case, along one of the axes some empty room will be 
left in the image. MapServer then extends the geographic extent on that 
axis on both sides, so as to fill up the image completely.

This is different from the WMS specification, where the requested extent 
is always returned, if needed with distortion to fit within the image 
size. There has been some discussion going on about his "non-square 
pixel" problem, and I think it is possible now to add an extra MapFile 
parameter to let MapServer behave in this way.

Jan



More information about the MapServer-users mailing list